Skip to content

Commit

Permalink
fix(Revert): "compat: remove Object.assign fallback (#25)"
Browse files Browse the repository at this point in the history
This reverts commit 627ab55.
  • Loading branch information
iarna committed Jul 6, 2018
1 parent a815ec9 commit cce5a62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 4 additions & 3 deletions git-host.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'
var gitHosts = require('./git-host-info.js')
var extend = Object.assign || require('util')._extend

var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) {
var gitHostInfo = this
Expand All @@ -22,9 +23,9 @@ GitHost.prototype.hash = function () {

GitHost.prototype._fill = function (template, opts) {
if (!template) return
var vars = Object.assign({}, opts)
var vars = extend({}, opts)
vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : ''
opts = Object.assign({}, this.opts, opts)
opts = extend(extend({}, this.opts), opts)
var self = this
Object.keys(this).forEach(function (key) {
if (self[key] != null && vars[key] == null) vars[key] = self[key]
Expand Down Expand Up @@ -117,7 +118,7 @@ GitHost.prototype.tarball = function (opts) {
}

GitHost.prototype.file = function (P, opts) {
return this._fill(this.filetemplate, Object.assign({ path: P }, opts))
return this._fill(this.filetemplate, extend({ path: P }, opts))
}

GitHost.prototype.getDefaultRepresentation = function () {
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"bitbucket",
"gitlab"
],
"engines": {
"node": ">=4"
},
"author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org)",
"license": "ISC",
"bugs": {
Expand Down

1 comment on commit cce5a62

@JACKEYBANKZ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.8.8 (2020-02-29)

Bug Fixes

  • #61 & #65 addressing issues w/ url.URL implmentation which regressed node 6 support (5038b18), closes #66

2.8.7 (2020-02-26)

Bug Fixes

  • Do not attempt to use url.URL when unavailable (2d0bb66), closes #61 #62
  • Do not pass scp-style URLs to the WhatWG url.URL (f2cdfcf), closes #60

2.8.6 (2020-02-25)

2.8.5 (2019-10-07)

Bug Fixes

  • updated pathmatch for gitlab (e8325b5), closes #51
  • updated pathmatch for gitlab (ffe056f)

2.8.4 (2019-08-12)

2.8.3 (2019-08-12)

2.8.2 (2019-08-05)

Bug Fixes

  • http protocol use sshurl by default (3b1d629), closes #48

2.8.1 (2019-08-05)

Bug Fixes

  • ignore noCommittish on tarball url generation (5d4a8d7)
  • use gist tarball url that works for anonymous gists (1692435)

2.8.0 (2019-08-05)

Bug Fixes

  • Allow slashes in gitlab project section (bbcf7b2), closes #46 #43
  • git-host: disallow URI-encoded slash (%2F) in path (3776fa5), closes #44
  • gitlab: Do not URL encode slashes in project name for GitLab https URL (cbf04f9), closes #47
  • do not allow invalid gist urls (d5cf830)
  • cache: Switch to lru-cache to save ourselves from unlimited memory consumption (e518222), closes #38

Features

  • give these objects a name (60abaea)

2.7.1 (2018-07-07)

Bug Fixes

  • index: Guard against non-string types (5bc580d)
  • parse: Crash on strings that parse to having no host (c931482), closes #35

2.7.0 (2018-07-06)

Bug Fixes

  • github tarball: update github tarballtemplate (6efd582), closes #34
  • gitlab docs: switched to lowercase anchors for readmes (701bcd1)

Features

2.6.1 (2018-06-25)

Bug Fixes

  • Revert: "compat: remove Object.assign fallback (#25)" (cce5a62)
  • Revert: "git-host: fix forgotten extend()" (a815ec9)

2.6.0 (2018-03-07)

Please sign in to comment.