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

Include LICENSE file in the installed node_modules #51

Closed
4 tasks done
MarkAshraf96 opened this issue Sep 23, 2024 · 11 comments
Closed
4 tasks done

Include LICENSE file in the installed node_modules #51

MarkAshraf96 opened this issue Sep 23, 2024 · 11 comments
Labels
💪 phase/solved Post is done

Comments

@MarkAshraf96
Copy link

Initial checklist

Problem

Including the license file in the installed node_modules, makes the packages compatible with license checkers and attribution file generators, that a lot of developers need for their work.

Solution

Add the license file in the package.json to the 'files' field of each package.

Alternatives

Nothing on my mind, that can replace that.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Sep 23, 2024
@wooorm
Copy link
Member

wooorm commented Sep 23, 2024

License checkers should be able to look at the package.json? Do you use tools that don’t do that?

@wooorm
Copy link
Member

wooorm commented Sep 23, 2024

I don’t think your solution works. If we link from files to ../../license, I’m quite sure that no license file will be packaged?

@remcohaszing
Copy link
Member

We could either copy the license in the build scripts, or just copy the license into all packages once. We already include the license in packages in other monorepos, such as remark.

@MarkAshraf96
Copy link
Author

License checkers should be able to look at the package.json? Do you use tools that don’t do that?

They are able to detect the license type, but they are not able to detect the license text, which is required for creating copyrights/attribution files.

I don’t think your solution works. If we link from files to ../../license, I’m quite sure that no license file will be packaged?

To be honest, I am not quiet sure that it would work or not. Another solution that I just bumped into in another monorepo, is just copying the license into all packages.

@MarkAshraf96
Copy link
Author

We could either copy the license in the build scripts, or just copy the license into all packages once. We already include the license in packages in other monorepos, such as remark.

And micromark also, I believe you did the same.

@wooorm wooorm closed this as completed in 79383ba Sep 27, 2024
@wooorm wooorm added the 💪 phase/solved Post is done label Sep 27, 2024
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Sep 27, 2024
@wooorm
Copy link
Member

wooorm commented Sep 27, 2024

released!

@MarkAshraf96
Copy link
Author

released!

Thank you a lot, another thing because I was looking also into doing the same in other repos that you are maintaining. Do you think it's good if you add the license file also to the installed packages?

@wooorm
Copy link
Member

wooorm commented Sep 27, 2024

Sorry, I don’t understand your question. Can you rephrase please

@MarkAshraf96
Copy link
Author

Yes sure,
I mean including the license files in the package distribution.
I believe it's also considered as a best practice.

@wooorm
Copy link
Member

wooorm commented Sep 27, 2024

That’s what I just did? What is the question?

@MarkAshraf96
Copy link
Author

My fault sorry, I didn't notice that they are already included, and the changes you did in the pipeline-package.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done
Development

No branches or pull requests

3 participants