From 2c4a0a332301f6e1b2954499039ace92867f625b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sep 03 2019 19:52:40 +0000 Subject: Update to 0.4.22 upstream release --- diff --git a/.gitignore b/.gitignore index 06d4b9a..163c63a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /nodejs-xml2js-0.4.19.tar.gz /nodejs-xml2js-0.4.20.tar.gz /nodejs-xml2js-0.4.21.tar.gz +/nodejs-xml2js-0.4.22.tar.gz diff --git a/nodejs-xml2js-promisify.patch b/nodejs-xml2js-promisify.patch new file mode 100644 index 0000000..a060039 --- /dev/null +++ b/nodejs-xml2js-promisify.patch @@ -0,0 +1,104 @@ +commit b3ef619a3df4a043385823a39729acd36a21cba4 +Author: Tom Hughes +Date: Tue Sep 3 20:49:57 2019 +0100 + + Patch out use of shim that is not needed by modern Node.js + +diff --git a/lib/parser.js b/lib/parser.js +index cbcc8f3..f05c6ac 100644 +--- a/lib/parser.js ++++ b/lib/parser.js +@@ -1,7 +1,7 @@ + // Generated by CoffeeScript 1.12.7 + (function() { + "use strict"; +- var bom, defaults, events, isEmpty, processItem, processors, promisify, sax, setImmediate, ++ var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate, util, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; +@@ -10,6 +10,8 @@ + + events = require('events'); + ++ util = require('util'); ++ + bom = require('./bom'); + + processors = require('./processors'); +@@ -18,8 +20,6 @@ + + defaults = require('./defaults').defaults; + +- promisify = require('util.promisify'); +- + isEmpty = function(thing) { + return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; + }; +@@ -335,7 +335,7 @@ + }; + + Parser.prototype.parseStringPromise = function(str) { +- return promisify(this.parseString)(str); ++ return util.promisify(this.parseString)(str); + }; + + return Parser; +diff --git a/package.json b/package.json +index eede8e3..2e35eef 100644 +--- a/package.json ++++ b/package.json +@@ -75,8 +75,7 @@ + }, + "dependencies": { + "sax": ">=0.6.0", +- "xmlbuilder": "~11.0.0", +- "util.promisify": "~1.0.0" ++ "xmlbuilder": "~11.0.0" + }, + "devDependencies": { + "coffee-script": ">=1.10.0", +diff --git a/src/parser.coffee b/src/parser.coffee +index 6556df0..69d2e39 100644 +--- a/src/parser.coffee ++++ b/src/parser.coffee +@@ -2,11 +2,11 @@ + + sax = require 'sax' + events = require 'events' ++util = require 'util' + bom = require './bom' + processors = require './processors' + setImmediate = require('timers').setImmediate + defaults = require('./defaults').defaults +-promisify = require 'util.promisify' + + # Underscore has a nice function for this, but we try to go without dependencies + isEmpty = (thing) -> +@@ -255,7 +255,7 @@ class exports.Parser extends events + throw err + + parseStringPromise: (str) => +- promisify(@parseString) str ++ util.promisify(@parseString) str + + exports.parseString = (str, a, b) -> + # let's determine what we got as arguments +diff --git a/test/parser.test.coffee b/test/parser.test.coffee +index ba10fab..e4a7ba6 100644 +--- a/test/parser.test.coffee ++++ b/test/parser.test.coffee +@@ -5,11 +5,11 @@ util = require 'util' + assert = require 'assert' + path = require 'path' + os = require 'os' +-promisify = require 'util.promisify' ++util = require 'util' + + fileName = path.join __dirname, '/fixtures/sample.xml' + +-readFilePromise = promisify fs.readFile ++readFilePromise = util.promisify fs.readFile + + skeleton = (options, checks) -> + (test) -> diff --git a/nodejs-xml2js.spec b/nodejs-xml2js.spec index 927fa85..a3e93a4 100644 --- a/nodejs-xml2js.spec +++ b/nodejs-xml2js.spec @@ -1,11 +1,13 @@ Name: nodejs-xml2js -Version: 0.4.21 +Version: 0.4.22 Release: 1%{?dist} Summary: Simple XML to JavaScript object converter License: MIT URL: https://github.com/Leonidas-from-XIV/node-xml2js Source0: https://github.com/Leonidas-from-XIV/node-xml2js/archive/%{version}/%{name}-%{version}.tar.gz +# Patch out use of shim that is not needed by modern Node.js +Patch0: nodejs-xml2js-promisify.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch @@ -52,6 +54,9 @@ cp -pr package.json lib %{buildroot}/%{nodejs_sitelib}/xml2js %changelog +* Tue Sep 3 2019 Tom Hughes - 0.4.22-1 +- Update to 0.4.22 upstream release + * Mon Sep 2 2019 Tom Hughes - 0.4.21-1 - Update to 0.4.21 upstream release diff --git a/sources b/sources index ba85b83..a15c3c7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nodejs-xml2js-0.4.21.tar.gz) = 8049a741db774ef68f656c1fb3ba20e884e6648c85573bbebe5ad4fc73b035b0d3ef37df1a18e3b4dd423b4e9bb563d40fe62332eacd635ff61d7c0ef0b7ec4a +SHA512 (nodejs-xml2js-0.4.22.tar.gz) = 9b58b1820f936579f6f9d19c3e9daf6e9bebcd9d3e48ce675d962681f17f25759d710b5dbe485875b59a55b9cb55ca2893d202a66ac616eb71bbebee0c86675d