Skip to content

Commit

Permalink
chore(conventional-changelog-core): stop using deprecated url.parse
Browse files Browse the repository at this point in the history
  • Loading branch information
tommywo committed Nov 3, 2019
1 parent e865af4 commit 4c497e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/conventional-changelog-core/lib/merge-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ try {
}
var readPkg = require('read-pkg')
var readPkgUp = require('read-pkg-up')
var url = require('url')
var _ = require('lodash')

var rhosts = /github|bitbucket|gitlab/i
Expand Down Expand Up @@ -164,7 +163,7 @@ function mergeConfig (options, context, gitRawCommitsOpts, parserOpts, writerOpt

if (repo.browse) {
var browse = repo.browse()
var parsedBrowse = url.parse(browse)
var parsedBrowse = new URL(browse)
context.host = context.host || (repo.domain ? (parsedBrowse.protocol + (parsedBrowse.slashes ? '//' : '') + repo.domain) : null)
context.owner = context.owner || repo.user || ''
context.repository = context.repository || repo.project
Expand Down

0 comments on commit 4c497e6

Please sign in to comment.