From 7527faf24ba1ca327daf18ec09178ebd4988da38 Mon Sep 17 00:00:00 2001 From: Jared Smith Date: Apr 06 2018 01:15:27 +0000 Subject: Add patch to use decompress-response instead of unzip-response --- diff --git a/nodejs-got.spec b/nodejs-got.spec index ad5a52b..75feed7 100644 --- a/nodejs-got.spec +++ b/nodejs-got.spec @@ -5,12 +5,14 @@ Name: nodejs-%{module_name} Version: 6.7.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Simplified HTTP/HTTPS requests License: MIT URL: https://github.com/sindresorhus/got Source0: https://github.com/sindresorhus/%{module_name}/archive/v%{version}.tar.gz +Patch0: nodejs-got_use-decompress-response.patch + BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch @@ -40,8 +42,7 @@ It also supports following redirects and automagically handling gzip/deflate. %prep %setup -q -n %{module_name}-%{version} rm -rf node_modules -%nodejs_fixdep -r unzip-response -%nodejs_fixdep decompress-response +%patch0 -p1 #Remove following get-stream in next release > 6.6.3 %nodejs_fixdep get-stream @@ -74,6 +75,9 @@ tap test/test-*.js %{nodejs_sitelib}/%{module_name} %changelog +* Fri Apr 06 2018 Jared K. Smith - 6.7.1-9 +- Add patch to move to using decompress-response + * Mon Feb 26 2018 Jared Smith - 6.7.1-8 - Use npm(decompress-response) instead of npm(unzip-response) diff --git a/nodejs-got_use-decompress-response.patch b/nodejs-got_use-decompress-response.patch new file mode 100644 index 0000000..4fb5f5f --- /dev/null +++ b/nodejs-got_use-decompress-response.patch @@ -0,0 +1,44 @@ +diff --git a/index.js b/index.js +index 31a64dd..7ed28f3 100644 +--- a/index.js ++++ b/index.js +@@ -12,7 +12,7 @@ const timedOut = require('timed-out'); + const urlParseLax = require('url-parse-lax'); + const lowercaseKeys = require('lowercase-keys'); + const isRedirect = require('is-redirect'); +-const unzipResponse = require('unzip-response'); ++const decompressResponse = require('decompress-response'); + const createErrorClass = require('create-error-class'); + const isRetryAllowed = require('is-retry-allowed'); + const Buffer = require('safe-buffer').Buffer; +@@ -54,7 +54,7 @@ function requestAsEventEmitter(opts) { + } + + setImmediate(() => { +- const response = typeof unzipResponse === 'function' && req.method !== 'HEAD' ? unzipResponse(res) : res; ++ const response = typeof decompressResponse === 'function' && req.method !== 'HEAD' ? decompressResponse(res) : res; + response.url = redirectUrl || requestUrl; + response.requestUrl = requestUrl; + +diff --git a/package.json b/package.json +index 0e95573..873c6fa 100644 +--- a/package.json ++++ b/package.json +@@ -20,7 +20,7 @@ + "node": ">=4" + }, + "browser": { +- "unzip-response": false ++ "decompress-response": false + }, + "scripts": { + "test": "xo && nyc ava", +@@ -54,7 +54,7 @@ + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", +- "unzip-response": "^2.0.1", ++ "decompress-response": "^3.2.0", + "url-parse-lax": "^1.0.0" + }, + "devDependencies": {