Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package @ariakit/test should be a dev dependency #56091

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

anomiex
Copy link
Contributor

@anomiex anomiex commented Nov 13, 2023

What?

Remove an unnecessary dependency of the published @wordpress/components package on @ariakit/test.

Why?

As it is, everyone using @wordpress/components winds up having to install @ariakit/test and its dependencies unnecessarily.

How?

Move the dependency to devDependencies. And, per your linting, apparently devDependencies has to go in the root package.json.

Testing Instructions

With pnpm, you can do pnpm add file:///path/to/gutenberg/packages/components in a fresh directory and then check that @ariakit/test is not installed as a dependency.

Looks like with npm you'll have to npm pack to create a wordpress-components-25.11.0.tgz file then in the fresh directory npm install /path/to/wordpress-components-25.11.0.tgz. Then, again, check that @ariakit/test is not installed as a dependency.

In WordPress#54939 a new test was added that depends on `@ariakit/test`. But,
even though that package is not needed in the production code, it was
(accidentally?) added to `dependencies` instead of `devDependencies`.

This means everyone using `@wordpress/components` winds up having to
install this package. Let's move it to devDependencies where it belongs.
@anomiex
Copy link
Contributor Author

anomiex commented Nov 13, 2023

@ciampo @diegohaz Pinging you as people who were involved with #54939.

Copy link
Member

@diegohaz diegohaz left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks!

@Mamaduka Mamaduka added the [Type] Build Tooling Issues or PRs related to build tooling label Nov 14, 2023
@ciampo ciampo merged commit 1d1abd2 into WordPress:trunk Nov 15, 2023
50 checks passed
@ciampo
Copy link
Contributor

ciampo commented Nov 15, 2023

Yup, good catch indeed. Thanks!

@github-actions github-actions bot added this to the Gutenberg 17.1 milestone Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
4 participants