Skip to content

Commit 627ab55

Browse files
fregantezkat
authored andcommitted
fix(compat): remove Object.assign fallback (#25)
1 parent 88da66d commit 627ab55

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

git-host.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict'
22
var gitHosts = require('./git-host-info.js')
3-
var extend = Object.assign || require('util')._extend
43

54
var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) {
65
var gitHostInfo = this
@@ -23,8 +22,8 @@ GitHost.prototype.hash = function () {
2322

2423
GitHost.prototype._fill = function (template, opts) {
2524
if (!template) return
26-
var vars = extend({}, opts)
27-
opts = extend(extend({}, this.opts), opts)
25+
var vars = Object.assign({}, opts)
26+
opts = Object.assign({}, this.opts, opts)
2827
var self = this
2928
Object.keys(this).forEach(function (key) {
3029
if (self[key] != null && vars[key] == null) vars[key] = self[key]
@@ -100,7 +99,7 @@ GitHost.prototype.tarball = function (opts) {
10099
}
101100

102101
GitHost.prototype.file = function (P, opts) {
103-
return this._fill(this.filetemplate, extend({
102+
return this._fill(this.filetemplate, Object.assign({
104103
path: P.replace(/^[/]+/g, '')
105104
}, opts))
106105
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"bitbucket",
1414
"gitlab"
1515
],
16+
"engines": {
17+
"node": ">=4"
18+
},
1619
"author": "Rebecca Turner <[email protected]> (http://re-becca.org)",
1720
"license": "ISC",
1821
"bugs": {

0 commit comments

Comments
 (0)