commit
e35a8d75d6
BIN
nodejs-iconv-lite-0.4.18.tar.gz
Normal file
BIN
nodejs-iconv-lite-0.4.18.tar.gz
Normal file
Binary file not shown.
31
nodejs-iconv-lite-node10.patch
Normal file
31
nodejs-iconv-lite-node10.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
commit 55f9047c9da3edccf0bc7d80a09bcc2d92166da1
|
||||||
|
Author: Douglas Wilson <dougwilson@live.com>
|
||||||
|
Date: Sat May 5 19:18:29 2018 -0400
|
||||||
|
|
||||||
|
Use older semver style for old Node.js 0.10 npm versions (#182)
|
||||||
|
|
||||||
|
* Use older semver style for old Node.js 0.10 npm versions
|
||||||
|
* Fix test for changes Node.js 10 behavior
|
||||||
|
|
||||||
|
diff --git a/test/streams-test.js b/test/streams-test.js
|
||||||
|
index e1accff..3f7823f 100644
|
||||||
|
--- a/test/streams-test.js
|
||||||
|
+++ b/test/streams-test.js
|
||||||
|
@@ -214,13 +214,14 @@ describe("Streaming mode", function() {
|
||||||
|
input: [[0x3D], [0xD8, 0x3B], [0xDE]], // U+1F63B, 😻, SMILING CAT FACE WITH HEART-SHAPED EYES
|
||||||
|
outputType: false, // Don't concat
|
||||||
|
checkOutput: function(res) {
|
||||||
|
- if (semver.lt(process.version, "v6.2.1")) {
|
||||||
|
- assert.deepEqual(res, ["\uD83D\uDE3B"]); // We should have only 1 chunk.
|
||||||
|
- } else {
|
||||||
|
+ if (semver.satisfies(process.version, '>= 6.2.1 < 10.0.0')) {
|
||||||
|
// After a string_decoder rewrite in https://github.com/nodejs/node/pull/6777, which
|
||||||
|
// was merged in Node v6.2.1, we don't merge chunks anymore.
|
||||||
|
// Not really correct, but it seems we cannot do anything with it.
|
||||||
|
+ // Though it has been fixed again in Node v10.0.0
|
||||||
|
assert.deepEqual(res, ["\uD83D", "\uDE3B"]);
|
||||||
|
+ } else {
|
||||||
|
+ assert.deepEqual(res, ["\uD83D\uDE3B"]); // We should have only 1 chunk.
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}));
|
||||||
40
nodejs-iconv-lite.spec
Normal file
40
nodejs-iconv-lite.spec
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
Name: nodejs-iconv-lite
|
||||||
|
Version: 0.4.18
|
||||||
|
Release: 1
|
||||||
|
Summary: Convert character encodings in pure JavaScript
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/ashtuchkin/iconv-lite
|
||||||
|
Source0: https://github.com/ashtuchkin/iconv-lite/archive/v%{version}/nodejs-iconv-lite-%{version}.tar.gz
|
||||||
|
Patch0: nodejs-iconv-lite-node10.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
BuildRequires: npm(iconv) npm(mocha) npm(semver)
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n iconv-lite-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/iconv-lite
|
||||||
|
cp -pr package.json encodings/ lib/ \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/iconv-lite
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
rm test/dbcs-test.js
|
||||||
|
rm test/sbcs-test.js
|
||||||
|
mocha --reporter spec --grep .
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README.md Changelog.md
|
||||||
|
%license LICENSE
|
||||||
|
%{nodejs_sitelib}/iconv-lite
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 0.4.18-1
|
||||||
|
- Package init
|
||||||
4
nodejs-iconv-lite.yaml
Normal file
4
nodejs-iconv-lite.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: ashtuchkin/iconv-lite
|
||||||
|
tag_pattern: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user