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

Loader's package.json does not have private:true attribute #3565

Closed
supersabillon opened this issue Aug 31, 2022 · 4 comments
Closed

Loader's package.json does not have private:true attribute #3565

supersabillon opened this issue Aug 31, 2022 · 4 comments
Assignees
Labels
Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through.

Comments

@supersabillon
Copy link
Contributor

Stencil version:

Current behavior:
When generating a loader, the package.json does not have a private: true attribute

Expected behavior:
It should have a private: true attribute since we don't intend to publish to npm.

@rwaskiewicz
Copy link
Member

Hey @supersabillon 👋

Can you explain the motivation for this issue/its PR for me a little to help me understand a bit better? Did you run into an issue where loader was accidentally published to NPM? Some other issue perhaps? No issue at all?

Thanks!

@rwaskiewicz rwaskiewicz added the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Aug 31, 2022
@ionitron-bot ionitron-bot bot removed the triage label Aug 31, 2022
@supersabillon
Copy link
Contributor Author

hi @rwaskiewicz yeah apologies I should have provided more context. Some tools used in monorepos for publishing packages, for example we are using Changesets, use this property to check if a package needs to be published.

So Changesets tries to publish this package and throws an error when it can't find it in the registry. Not sure if this is happening with other tools like Lerna.

So this is not a Stencil issue, but more of an improvement we will get when working in monorepos and using tooling to help publish packages.

Here is the PR: #3566

@ionitron-bot ionitron-bot bot removed the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Aug 31, 2022
@rwaskiewicz
Copy link
Member

Thanks!

This seems like a reasonable enough request. I’m not an expert on Changesets (the project) by any means. I did some reading up on how Changesets operates, and if there was an alternative to making a change in Stencil.
Like I said though, this is a reasonable enough request, we’re just a little wary of making a change to fit any given tool/repo setup.

It seems that Changesets provides an ignore field, but it’s not “meant” to be used permanently:

This option allows you to specify some packages that will not be published, even if they are referenced in changesets. Instead, those changesets will be skipped until they are removed from this array.

THIS FEATURE IS DESIGNED FOR TEMPORARY USE TO ALLOW CHANGES TO BE MERGED WITHOUT PUBLISHING THEM - If you want to stop a package from being published at all, set private: true in its package.json.
Which, while I don’t agree with their stance, is reasonable I suppose.

So I think this is all reasonable enough/something we can potentially merge 👍 Let me test it out a bit 🙂

@rwaskiewicz rwaskiewicz added the Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through. label Sep 1, 2022
@rwaskiewicz
Copy link
Member

A fix for this bug has been release as a part of Stencil v2.18.0. I'm going to close this issue, but please feel free to open a new issue should the bug reoccur. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through.
Projects
None yet
Development

No branches or pull requests

2 participants