fix: rename bin entry to valid name for Yarn 4 (Berry) compatibility#717
Open
bmbferreira wants to merge 1 commit intotestomatio:2.xfrom
Open
fix: rename bin entry to valid name for Yarn 4 (Berry) compatibility#717bmbferreira wants to merge 1 commit intotestomatio:2.xfrom
bmbferreira wants to merge 1 commit intotestomatio:2.xfrom
Conversation
The bin name "testomatio/reporter" contains a forward slash which is rejected by Yarn 4's identifier parser during the link step: Error: Invalid ident (testomatio/reporter) PR testomatio#617 partially fixed testomatio#446 by removing the "@" prefix, but the "/" still makes it invalid for Yarn Berry. Rename to "testomatio-reporter" which is a valid POSIX command name. Fixes testomatio#716 Made-with: Cursor
Collaborator
|
Thank you for this report and PR. |
Contributor
Author
@olexandr13 thanks for the quick reply. Yes we can have a different solution. I just want to be able to use latest version using yarn 4 without any hacky patches on my end. 🙇 |
Contributor
Author
|
@olexandr13 any suggestion here? how can we have this working with yarn berry v4 without any hacks with patches on my end? Thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the
binentry inpackage.jsonfrom"testomatio/reporter"to"testomatio-reporter".The forward slash in
"testomatio/reporter"is rejected by Yarn 4 (Berry) during the link step:This is a follow-up to PR #617 / issue #446, which removed the
@prefix but left the/, which is still invalid for Yarn Berry's identifier parser.Why this breaks
npm view @testomatio/reporter binshows"reporter"), which is why npm-based installs work finepackage.jsonfrom inside the tarball, where the original"testomatio/reporter"key is preservedSa()ident parser then rejects the slashWhat this changes
One line in
package.json:"bin": { - "testomatio/reporter": "./src/bin/cli.js", + "testomatio-reporter": "./src/bin/cli.js",The dash-separated name
testomatio-reporteris a valid POSIX command name and preserves the namespacing intent.Testing
yarn add @testomatio/reporterin a Yarn 4.12.0 project now succeeds with this fix applied as a local patchFixes #716
Made with Cursor