#1 Upgrade to 2.1.1 to trim down dependencies
Merged 3 years ago by jsmith. Opened 3 years ago by jstanek.
rpms/ jstanek/nodejs-ansi-regex master  into  master

file modified
+2
@@ -2,3 +2,5 @@ 

  /ansi-regex-2.0.0.tgz

  /tests-2.0.0.tar.bz2

  /dl-tests.sh

+ /ansi-regex-2.1.1.tgz

+ /test.js

file modified
+14 -13
@@ -4,28 +4,26 @@ 

  

  %{?nodejs_find_provides_and_requires}

  

- %global enable_tests 1

+ # Disable tests due to missing npm(ava)

+ %bcond_with tests

  

  Name:           nodejs-ansi-regex

- Version:        2.0.0

- Release:        12%{?dist}

+ Version:        2.1.1

+ Release:        1%{?dist}

  Summary:        Regular expression for matching ANSI escape codes

  URL:            https://github.com/sindresorhus/ansi-regex

  Source0:        https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz

  # The test files are not included in the npm tarball.

- # Source1 is generated by running Source10, which pulls from the upstream

- # version control repository.

- Source1:        tests-%{version}.tar.bz2

- Source10:       dl-tests.sh

+ Source1:        https://raw.githubusercontent.com/chalk/ansi-regex/%{version}/test.js

  

  License:        MIT

  BuildArch:      noarch

  ExclusiveArch:  %{nodejs_arches} noarch

  

- BuildRequires:  nodejs-packaging

+ BuildRequires:  nodejs

  

- %if 0%{?enable_tests}

- BuildRequires: npm(mocha)

+ %if %{with tests}

+ BuildRequires: npm(ava)

  %endif

  

  %description
@@ -33,7 +31,7 @@ 

  

  %prep

  %setup -q -n package

- %setup -q -T -D -a 1 -n package

+ cp -p %{SOURCE1} "${PWD}"

  

  %build

  #nothing to do
@@ -46,11 +44,11 @@ 

  

  %{nodejs_symlink_deps}

  

- %if 0%{?enable_tests}

  %check

  %{nodejs_symlink_deps} --check

  %{__nodejs} -e 'require("./")'

- %{_bindir}/mocha -R spec test/test.js

+ %if %{with tests}

+ %{_bindir}/ava --verbose

  %endif

  

  %files
@@ -60,6 +58,9 @@ 

  %license license

  

  %changelog

+ * Thu Aug 06 2020 Jan Staněk <jstanek@redhat.com> - 2.1.1-1

+ - Upgrade to 2.1.1 to trim down dependencies

+ 

  * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-12

  - Second attempt - Rebuilt for

    https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

file modified
+2 -3
@@ -1,3 +1,2 @@ 

- 4486244de51be015f6b3239ec0520e93  ansi-regex-2.0.0.tgz

- 85b089cc2d3d91233f9db49680d848af  tests-2.0.0.tar.bz2

- 491c0261b3c62246fbeca75777327b89  dl-tests.sh

+ SHA512 (ansi-regex-2.1.1.tgz) = 4c81a74e9768f84dfea42c8096e66fb440f9a79c02a8b75ecc2ca13d9cca3dcc6f169944b788be5bb38e3422a0799153dfecb935965f38e4bf05d71a9e6d4c60

+ SHA512 (test.js) = 03fad0cc0eef8724017c90512664f10bbd54b30fdcf5967b51b5e28c2396c7bde4e6d9913d983e0d29615c9cd1d6a8244dee65053d5966a0b0de266c12a621a2

The way tests inclusion works was changed:

  1. The test suite is now single file; the dl-tests.sh script does not handle this case and I did not yet look up where to contribute to it. Since single raw file can be downloaded directly from GitHub, I switched to that for the time being (and to get things moving).
  2. Using conditional compilation flag for enabling/disabling running of the tests.
  3. No tests are run by default, as the ava framework does not seem to be readily available in Fedora.

This change should resolve the F33 FTBFS issue.

Pull-Request has been merged by jsmith

3 years ago