A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/c84baa37c65e8bf1f730c585361d4a0bf8c9c67d below:

init-package-json@7.0.2 · npm/cli@c84baa3 · GitHub

File tree Expand file treeCollapse file tree 4 files changed

+10

-9

lines changed

Filter options

Expand file treeCollapse file tree 4 files changed

+10

-9

lines changed Original file line number Diff line number Diff line change

@@ -199,16 +199,17 @@ if (!package.scripts) {

199 199 200 200

if (!package.repository) {

201 201

exports.repository = async () => {

202 -

const gconf = await fs.readFile('.git/config', 'utf8').catch(() => '')

202 +

const gitConfigPath = path.resolve(dirname, '.git', 'config')

203 +

const gconf = await fs.readFile(gitConfigPath, 'utf8').catch(() => '')

203 204

const lines = gconf.split(/\r?\n/)

204 205 205 206

let url

206 207

const i = lines.indexOf('[remote "origin"]')

207 208 208 209

if (i !== -1) {

209 -

url = gconf[i + 1]

210 +

url = lines[i + 1]

210 211

if (!url.match(/^\s*url =/)) {

211 -

url = gconf[i + 2]

212 +

url = lines[i + 2]

212 213

}

213 214

if (!url.match(/^\s*url =/)) {

214 215

url = null

Original file line number Diff line number Diff line change

@@ -1,6 +1,6 @@

1 1

{

2 2

"name": "init-package-json",

3 -

"version": "7.0.1",

3 +

"version": "7.0.2",

4 4

"main": "lib/init-package-json.js",

5 5

"scripts": {

6 6

"test": "tap",

Original file line number Diff line number Diff line change

@@ -108,7 +108,7 @@

108 108

"graceful-fs": "^4.2.11",

109 109

"hosted-git-info": "^8.0.2",

110 110

"ini": "^5.0.0",

111 -

"init-package-json": "^7.0.1",

111 +

"init-package-json": "^7.0.2",

112 112

"is-cidr": "^5.1.0",

113 113

"json-parse-even-better-errors": "^4.0.0",

114 114

"libnpmaccess": "^9.0.0",

@@ -7599,9 +7599,9 @@

7599 7599

}

7600 7600

},

7601 7601

"node_modules/init-package-json": {

7602 -

"version": "7.0.1",

7603 -

"resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-7.0.1.tgz",

7604 -

"integrity": "sha512-8KZtk/53ReI2T2f6z2hl5ql6xKLjDexNw7DUqTdR8f+Mo8WZmBjjkH6DrTfBjmW0j3Tqx+j3t8creN0O890+0A==",

7602 +

"version": "7.0.2",

7603 +

"resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-7.0.2.tgz",

7604 +

"integrity": "sha512-Qg6nAQulaOQZjvaSzVLtYRqZmuqOi7gTknqqgdhZy7LV5oO+ppvHWq15tZYzGyxJLTH5BxRTqTa+cPDx2pSD9Q==",

7605 7605

"inBundle": true,

7606 7606

"license": "ISC",

7607 7607

"dependencies": {

Original file line number Diff line number Diff line change

@@ -73,7 +73,7 @@

73 73

"graceful-fs": "^4.2.11",

74 74

"hosted-git-info": "^8.0.2",

75 75

"ini": "^5.0.0",

76 -

"init-package-json": "^7.0.1",

76 +

"init-package-json": "^7.0.2",

77 77

"is-cidr": "^5.1.0",

78 78

"json-parse-even-better-errors": "^4.0.0",

79 79

"libnpmaccess": "^9.0.0",

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4