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

Changed @sondr3/minitest to be a peer dependency #65

Merged
merged 2 commits into from
Aug 12, 2023

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Aug 12, 2023

Background

In a Node project, when @sondr3/minitest is installed as a dependency, we can run its executable (called mt) to run tests easily:

/* Example: @codemod-utils/ast-javascript */
{
  "scripts: {
    "test": "./build.sh --test && mt dist-for-testing --quiet"
  }
}

@codemod-utils/tests@v0.2.5 (and earlier versions) had @sondr3/minitest as a dependency so that the consuming project wouldn't need to install it themselves. However, I couldn't figure out how to update the test script, i.e. how to replace the command mt with node_modules/<some path>/mt.

What changed?

For simplicity (that is, allow the test script to continue to show the mt command), we'll ask the consuming project to install @sondr3/minitest as a development dependency. This already happens when we use @codemod-utils/cli to create a codemod project.

In effect, removing @sondr3/minitest as a dependency from @codemod-utils/tests will prevent the consuming project from potentially installing two versions of @sondr3/minitest.

@ijlee2 ijlee2 added enhance: code Issue asks for new feature or refactor breaking Breaking change will result in a new major version labels Aug 12, 2023
@ijlee2 ijlee2 marked this pull request as ready for review August 12, 2023 05:41
@ijlee2 ijlee2 merged commit 49f3588 into main Aug 12, 2023
2 checks passed
@ijlee2 ijlee2 deleted the change-@sondr3/minitest-to-peer-dependency branch August 12, 2023 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change will result in a new major version enhance: code Issue asks for new feature or refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant