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

chore(build): add directory details to the package.json of all packages #7649

Merged
merged 1 commit into from
Jan 18, 2019
Merged

chore(build): add directory details to the package.json of all packages #7649

merged 1 commit into from
Jan 18, 2019

Conversation

greysteil
Copy link
Contributor

Specifying the directory as part of the repository field in a package.json allows npm and third party tools to provide better support when working with monorepos. For example, it allows them to correctly construct a commit diff for a specific package.

This format was accepted by npm in npm/rfcs#19.

Specifying the directory as part of the `repository` field in a `package.json`
allows third party tools to provide better support when working with monorepos.
For example, it allows them to correctly construct a commit diff for a specific
package.

This format was accepted by npm in npm/rfcs#19.
@SimenB
Copy link
Member

SimenB commented Jan 18, 2019

Nice! Is this something yarn will support as well? I don't see it mentioned in the RFC (/cc @arcanis).

@greysteil
Copy link
Contributor Author

greysteil commented Jan 18, 2019

Not sure - might be useful to Yarn, but the main use cases I had in mind when writing were:

  • better links from the npmjs.com website (straight to here for jest-mock, rather than to the root directory, for example)
  • better commit diffs for tools like Dependabot (link straight to these commits when linking to commits for jest-mock, rather than linking to all the commits in this repo, for example)

Can imagine there are other use cases where knowing where something lives within a monorepo is also useful, though!

@codecov-io
Copy link

Codecov Report

Merging #7649 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7649   +/-   ##
=======================================
  Coverage   68.28%   68.28%           
=======================================
  Files         250      250           
  Lines        9627     9627           
  Branches        5        5           
=======================================
  Hits         6574     6574           
  Misses       3051     3051           
  Partials        2        2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a35381f...1d0a097. Read the comment docs.

@SimenB
Copy link
Member

SimenB commented Jan 18, 2019

better links from the npmjs.com website

Yeah, that's the same thing https://yarnpkg.com would do, I'd hope. And yarn's website is open source, so should be possible to PR it 🙂 https://github.com/yarnpkg/website

@SimenB SimenB merged commit 24283e6 into jestjs:master Jan 18, 2019
@greysteil
Copy link
Contributor Author

Oh nice! Will PR it 🙂

@greysteil greysteil deleted the package-directory-details branch January 18, 2019 13:15
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants