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 package.json #152

Merged
merged 1 commit into from Jun 3, 2023
Merged

Changed package.json #152

merged 1 commit into from Jun 3, 2023

Conversation

Ulyanov-programmer
Copy link
Contributor

Proposed Changes

Moved a line indicating a dependency on posthtml from devDependencies to dependencies.
This should allow you to run the plugin in plug'n'play mode in the yarn package manager.
Done for this issue: #151

Types of Changes

  • Bug (non-breaking change which fixes an issue)

Checklist

@Scrum
Copy link
Member

Scrum commented Jun 2, 2023

The posthtml package is not included in the project as an explicit dependency, I don't understand why you moved it?

@Ulyanov-programmer
Copy link
Contributor Author

Ulyanov-programmer commented Jun 2, 2023

When using Yarn with plug'n'play technology, it simply does not see the package's dependency on posthtml.
In this case, if you try to use the package, yarn will simply give an error when starting.

posthtml/posthtml-components#33 (comment)

Judging by the experience of another plugin, this can be avoided by specifying the plugins that are used during work in the usual dependencies.

Solving the problem:
posthtml/posthtml-components#33 (comment)
posthtml/posthtml-components#33 (comment)

UPD: also see #151

@Scrum
Copy link
Member

Scrum commented Jun 3, 2023

The plugin does not require the posthtml dependency, you are clearly doing something wrong. Give a link to the repository with the problem reproduced.

@Ulyanov-programmer
Copy link
Contributor Author

The plugin has a direct dependency.

const { match } = require('posthtml/lib/api')

You can reconstruct the error by copying the repository: https://github.com/Ulyanov-programmer/gulp_multitool/tree/develop
After cloning, delete in the file .yarnrc.yml these code:

posthtml-expressions@*:
    dependencies:
      posthtml: "*"

And start the project by entering the yarn d command in the console.

@Scrum
Copy link
Member

Scrum commented Jun 3, 2023

Uhh, really, I missed that while browsing. Thank you.

@Scrum Scrum merged commit 5c139d2 into posthtml:master Jun 3, 2023
4 checks passed
@Ulyanov-programmer Ulyanov-programmer deleted the fix/yarn-pnp branch June 6, 2023 11:34
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.

None yet

2 participants