Skip to content

Remove 'src' directory from package files in abilities package#77296

Open
kushagra-goyal-14 wants to merge 1 commit intoWordPress:trunkfrom
kushagra-goyal-14:fix/exclude-abilities-src-from-package
Open

Remove 'src' directory from package files in abilities package#77296
kushagra-goyal-14 wants to merge 1 commit intoWordPress:trunkfrom
kushagra-goyal-14:fix/exclude-abilities-src-from-package

Conversation

@kushagra-goyal-14
Copy link
Copy Markdown
Contributor

What?

Part of #77274

Removes src from the files field in @wordpress/abilities's package.json.

Why?

The package defines an exports field that only exposes built artifacts (build/, build-module/, build-types/). Per Node.js module resolution, consumers cannot access files outside of exports. Shipping the src/ directory is unnecessary and inflates the published package size.

How?

Removes "src" from the files array.

Testing Instructions

  1. Verify the package builds: npm run build
  2. Verify npm pack --dry-run in packages/abilites/ no longer includes src/

Screenshots

Screenshot 2026-04-14 at 2 06 40 PM

@kushagra-goyal-14 kushagra-goyal-14 marked this pull request as ready for review April 14, 2026 08:58
@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: .

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: kushagra-goyal-14 <kush123@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant