fuanan add package

This commit is contained in:
fwx913451 2020-08-20 20:09:26 +08:00
parent 5d9543cf04
commit 4fe64a3aea
5 changed files with 212 additions and 0 deletions

BIN
es-to-primitive-1.2.0.tgz Normal file

Binary file not shown.

View File

@ -0,0 +1,66 @@
commit 9c41f2c17a8a62b5f26245e25a594a53b35f65ee
Author: Tom Hughes <tom@compton.nu>
Date: Sun Sep 30 18:33:57 2018 +0100
Patch out use of function.prototype.name
diff --git a/test/es2015.js b/test/es2015.js
index 80f4083..c172e99 100644
--- a/test/es2015.js
+++ b/test/es2015.js
@@ -4,7 +4,6 @@ var test = require('tape');
var toPrimitive = require('../es2015');
var is = require('object-is');
var forEach = require('foreach');
-var functionName = require('function.prototype.name');
var debug = require('object-inspect');
var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
@@ -12,7 +11,7 @@ var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol';
test('function properties', function (t) {
t.equal(toPrimitive.length, 1, 'length is 1');
- t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive');
+ t.equal(toPrimitive.name, 'ToPrimitive', 'name is ToPrimitive');
t.end();
});
diff --git a/test/es5.js b/test/es5.js
index 8b80ff5..a5352cf 100644
--- a/test/es5.js
+++ b/test/es5.js
@@ -4,12 +4,11 @@ var test = require('tape');
var toPrimitive = require('../es5');
var is = require('object-is');
var forEach = require('foreach');
-var functionName = require('function.prototype.name');
var debug = require('object-inspect');
test('function properties', function (t) {
t.equal(toPrimitive.length, 1, 'length is 1');
- t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive');
+ t.equal(toPrimitive.name, 'ToPrimitive', 'name is ToPrimitive');
t.end();
});
diff --git a/test/es6.js b/test/es6.js
index c6df63f..21bfecc 100644
--- a/test/es6.js
+++ b/test/es6.js
@@ -4,7 +4,6 @@ var test = require('tape');
var toPrimitive = require('../es6');
var is = require('object-is');
var forEach = require('foreach');
-var functionName = require('function.prototype.name');
var debug = require('object-inspect');
var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
@@ -12,7 +11,7 @@ var hasSymbolToPrimitive = hasSymbols && typeof Symbol.toPrimitive === 'symbol';
test('function properties', function (t) {
t.equal(toPrimitive.length, 1, 'length is 1');
- t.equal(functionName(toPrimitive), 'ToPrimitive', 'name is ToPrimitive');
+ t.equal(toPrimitive.name, 'ToPrimitive', 'name is ToPrimitive');
t.end();
});

View File

@ -0,0 +1,45 @@
%{?nodejs_find_provides_and_requires}
Name: nodejs-es-to-primitive
Version: 1.2.0
Release: 1
Summary: ECMAScript “ToPrimitive” algorithm
License: MIT
URL: https://github.com/ljharb/es-to-primitive
Source0: https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-%{version}.tgz
Patch0: nodejs-es-to-primitive-fpn.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(foreach) npm(is-callable) npm(is-date-object) npm(is-symbol) npm(object-is)
BuildRequires: npm(tape)
%description
ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES6 versions. When
different versions of the spec conflict, the default export will be the
latest version of the abstract operation. Alternative versions will also
be available under an es5/es6/es7 exported property if you require a
specific version.
%prep
%autosetup -p 1 -n package
%nodejs_fixdep is-symbol "^1.0.1"
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/es-to-primitive
cp -pr package.json index.js es5.js es6.js es2015.js helpers %{buildroot}%{nodejs_sitelib}/es-to-primitive
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} --harmony --es-staging test/index.js
%files
%doc README.md CHANGELOG.md
%license LICENSE
%{nodejs_sitelib}/es-to-primitive
%changelog
* Tue Aug 18 2020 Anan Fu <fuanan3@huawei.com> - 1.2.0-1
- package init

View File

@ -0,0 +1,97 @@
%{?nodejs_find_provides_and_requires}
Name: nodejs-es-to-primitive
Version: 1.2.0
Release: 5%{?dist}
Summary: ECMAScript “ToPrimitive” algorithm
License: MIT
URL: https://github.com/ljharb/es-to-primitive
Source0: https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-%{version}.tgz
Patch0: nodejs-es-to-primitive-fpn.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(foreach)
BuildRequires: npm(is-callable)
BuildRequires: npm(is-date-object)
BuildRequires: npm(is-symbol)
BuildRequires: npm(object-is)
BuildRequires: npm(tape)
%description
ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES6 versions. When
different versions of the spec conflict, the default export will be the
latest version of the abstract operation. Alternative versions will also
be available under an es5/es6/es7 exported property if you require a
specific version.
%prep
%autosetup -p 1 -n package
%nodejs_fixdep is-symbol "^1.0.1"
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/es-to-primitive
cp -pr package.json index.js es5.js es6.js es2015.js helpers %{buildroot}%{nodejs_sitelib}/es-to-primitive
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} --harmony --es-staging test/index.js
%files
%doc README.md CHANGELOG.md
%license LICENSE
%{nodejs_sitelib}/es-to-primitive
%changelog
* Mon Feb 4 2019 Tom Hughes <tom@compton.nu> - 1.2.0-5
- Include es2015.js in packaged files
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Sep 30 2018 Tom Hughes <tom@compton.nu> - 1.2.0-3
- Re-enable tests
* Sun Sep 30 2018 Tom Hughes <tom@compton.nu> - 1.2.0-2
- Fix npm(is-symbol) dependency
* Sun Sep 30 2018 Tom Hughes <tom@compton.nu> - 1.2.0-1
- Update to 1.2.0 upstream release
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jan 5 2016 Tom Hughes <tom@compton.nu> - 1.1.1-1
- Update to 1.1.1 upstream release
* Mon Dec 28 2015 Tom Hughes <tom@compton.nu> - 1.1.0-1
- Update to 1.1.0 upstream release
* Thu Oct 22 2015 Tom Hughes <tom@compton.nu> - 1.0.0-1
- Initial build of 1.0.0

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: ljharb/es-to-primitive
tag_prefix: "^"
seperator: "."