Skip to content

Packages: Exclude src from deprecated published package#77303

Open
SainathPoojary wants to merge 1 commit intoWordPress:trunkfrom
SainathPoojary:fix/package-deprecated
Open

Packages: Exclude src from deprecated published package#77303
SainathPoojary wants to merge 1 commit intoWordPress:trunkfrom
SainathPoojary:fix/package-deprecated

Conversation

@SainathPoojary
Copy link
Copy Markdown
Contributor

@SainathPoojary SainathPoojary commented Apr 14, 2026

What?

Part of #77274

Removes "src" from the files array in @wordpress/deprecated's package.json so that source files are no longer included in the published npm package.

Why?

The package defines an exports field that does not expose any src files. Per Node.js documentation, the exports field prevents consumers from accessing any entry points not explicitly defined. Shipping src alongside build unnecessarily inflates the published package size with files that are inaccessible to consumers.

How?

Removed "src" from the files array so it is no longer included in the published npm package.

Testing Instructions

  1. Verify the exports field in packages/deprecated/package.json does not reference any src paths.
  2. Confirm build, build-module, and build-types are still listed in files.
  3. Run npm pack --dry-run from packages/deprecated and confirm src/ files are absent.

Screenshots or screencast

Before After
image image

@github-actions github-actions Bot added the [Package] Deprecated packages/deprecated label Apr 14, 2026
@SainathPoojary SainathPoojary marked this pull request as ready for review April 15, 2026 18:28
@github-actions
Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: [Package] Deprecated.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SainathPoojary <sainathpoojary@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Deprecated packages/deprecated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant