Skip to content

Conversation

@milaninfy
Copy link
Contributor

@milaninfy milaninfy commented Dec 2, 2024

Fix for correctly inspect git config value and use remote repository url as repository value in default pacakage json value

Fixes npm/cli#7940

Testing

~/workarea/test-repo $ lnpm init -y
Wrote to /Users/milaninfy/workarea/test-repo/package.json:

{
  "name": "test-repo",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/milaninfy/test-repo.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/milaninfy/test-repo/issues"
  },
  "homepage": "https://github.com/milaninfy/test-repo#readme",
  "description": ""
}

@milaninfy milaninfy force-pushed the mm/fix-default-repo-value branch from 3c167cb to 0884298 Compare December 2, 2024 15:38
@milaninfy milaninfy force-pushed the mm/fix-default-repo-value branch from 0884298 to 21fc172 Compare December 2, 2024 15:41
@milaninfy milaninfy marked this pull request as ready for review December 2, 2024 16:08
@milaninfy milaninfy requested a review from a team as a code owner December 2, 2024 16:08
@wraithgar wraithgar merged commit c96ad4a into npm:main Dec 2, 2024
21 checks passed
@github-actions github-actions bot mentioned this pull request Dec 2, 2024
wraithgar pushed a commit that referenced this pull request Dec 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[7.0.2](v7.0.1...v7.0.2)
(2024-12-02)
### Bug Fixes
*
[`c96ad4a`](c96ad4a)
[#315](#315) default git
repository value if exist (#315) (@milaninfy)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

[BUG] npm init doesn't infer the git repo automatically

2 participants