diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1f15b45..0000000 --- a/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/chalk-0.4.0.tgz -/chalk-1.1.1.tgz -/chalk-fix-lack-of-dim.patch -/chalk-fix-tests.patch -/test.js -/license -/chalk-1.1.3.tgz diff --git a/chalk-fix-lack-of-dim.patch b/chalk-fix-lack-of-dim.patch deleted file mode 100644 index ac89f25..0000000 --- a/chalk-fix-lack-of-dim.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/index.js b/index.js -index 2d85a91..19b4b22 100644 ---- a/index.js -+++ b/index.js -@@ -73,9 +73,9 @@ function applyStyle() { - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. -- var originalDim = ansiStyles.dim.open; -+ var originalDim = ansiStyles.gray.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { -- ansiStyles.dim.open = ''; -+ ansiStyles.gray.open = ''; - } - - while (i--) { -@@ -88,7 +88,7 @@ function applyStyle() { - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. -- ansiStyles.dim.open = originalDim; -+ ansiStyles.gray.open = originalDim; - - return str; - } diff --git a/chalk-fix-tests.patch b/chalk-fix-tests.patch deleted file mode 100644 index 30ed230..0000000 --- a/chalk-fix-tests.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/test.js b/test.js -index a3aa8d6..8e3090a 100644 ---- a/test.js -+++ b/test.js -@@ -46,9 +46,11 @@ describe('chalk', function () { - assert.notEqual(green('baz'), greenBold('baz')); - }); - -+/* - it('should alias gray to grey', function () { - assert.equal(chalk.grey('foo'), '\u001b[90mfoo\u001b[39m'); - }); -+*/ - - it('should support variable number of arguments', function () { - assert.equal(chalk.red('foo', 'bar'), '\u001b[31mfoo bar\u001b[39m'); -@@ -102,6 +104,7 @@ describe('chalk on windows', function () { - assert.equal(chalkCtx.blue('foo'), '\u001b[34mfoo\u001b[39m'); - }); - -+/* - it('should not apply dimmed styling on gray strings, see https://github.com/chalk/chalk/issues/58', function () { - process.env.TERM = 'dumb'; - var chalkCtx = requireUncached('./'); -@@ -119,6 +122,7 @@ describe('chalk on windows', function () { - var chalkCtx = requireUncached('./'); - assert.equal(chalkCtx.blue.dim('foo'), '\u001b[94m\u001b[2mfoo\u001b[22m\u001b[39m'); - }); -+*/ - }); - - describe('chalk.enabled', function () { diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/nodejs-chalk.spec b/nodejs-chalk.spec deleted file mode 100644 index 37a21b0..0000000 --- a/nodejs-chalk.spec +++ /dev/null @@ -1,135 +0,0 @@ -%{?nodejs_find_provides_and_requires} - -# tests disabled because the ansi styling fails in mock -%global enable_tests 0 - -Name: nodejs-chalk -Version: 1.1.3 -Release: 9%{?dist} -Summary: Terminal string styling done right -License: MIT -URL: https://github.com/sindresorhus/chalk -Source0: http://registry.npmjs.org/chalk/-/chalk-%{version}.tgz -Source1: https://raw.githubusercontent.com/chalk/chalk/v%{version}/test.js -Source2: https://raw.githubusercontent.com/chalk/chalk/v%{version}/license - -# Fix tests -Patch0: chalk-fix-lack-of-dim.patch -# Disable failing tests -Patch1: chalk-fix-tests.patch - -BuildArch: noarch -%if 0%{?fedora} >= 19 -ExclusiveArch: %{nodejs_arches} noarch -%else -ExclusiveArch: %{ix86} x86_64 %{arm} noarch -%endif - -BuildRequires: nodejs-packaging -BuildRequires: npm(ansi-styles) -BuildRequires: npm(escape-string-regexp) -BuildRequires: npm(has-ansi) >= 2.0.0 -BuildRequires: npm(has-color) -BuildRequires: npm(strip-ansi) -BuildRequires: npm(supports-color) - -%if 0%{?enable_tests} -BuildRequires: npm(mocha) -BuildRequires: npm(require-uncached) -BuildRequires: npm(semver) -%endif - -%description -%{summary}. - - -%prep -%setup -q -n package -cp -p %{SOURCE1} . -cp -p %{SOURCE2} . -%patch0 -p1 -%patch1 -p1 - -%nodejs_fixdep has-color -%nodejs_fixdep ansi-styles '^2.0.0' -%nodejs_fixdep strip-ansi -%nodejs_fixdep supports-color - - -%build -#nothing to do - - -%install -mkdir -p %{buildroot}%{nodejs_sitelib}/chalk -cp -pr package.json index.js \ - %{buildroot}%{nodejs_sitelib}/chalk - -%nodejs_symlink_deps - - -%check -%nodejs_symlink_deps --check -%{__nodejs} -e 'require("./")' -%if 0%{?enable_tests} -ln -s %{nodejs_sitelib}/tape node_modules/tape -%{_bindir}/mocha -R spec -%else -%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" -%endif - -%files -%{!?_licensedir:%global license %doc} -%doc *.md -%license license -%{nodejs_sitelib}/chalk - - -%changelog -* Tue Jul 28 2020 Fedora Release Engineering - 1.1.3-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jan 29 2020 Fedora Release Engineering - 1.1.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 1.1.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 1.1.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.1.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Feb 08 2018 Fedora Release Engineering - 1.1.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.1.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.1.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sat Jul 23 2016 Jared Smith - 1.1.3-1 -- Update to upstream 1.1.3 release - -* Mon Feb 22 2016 Jared Smith - 1.1.1-8 -- Disable tests because they fail in mock - -* Mon Feb 22 2016 Jared Smith - 1.1.1-7 -- Update to upstream 1.1.1 release - -* Thu Feb 04 2016 Fedora Release Engineering - 0.4.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 0.4.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun Apr 20 2014 Jamie Nguyen - 0.4.0-2 -- fix versioned dependencies - -* Thu Mar 13 2014 Jamie Nguyen - 0.4.0-1 -- initial package diff --git a/sources b/sources deleted file mode 100644 index f523e79..0000000 --- a/sources +++ /dev/null @@ -1,5 +0,0 @@ -d7e0f89d6888d5d9ced994c205926555 chalk-1.1.3.tgz -129fc2a22fc2fdb5bebc6718c70ec821 test.js -a12ebca0510a773644101a99a867d210 license -6988f00d8e913ae0f94bb75104315c83 chalk-fix-lack-of-dim.patch -60a9e960e3b56d5fd8b8195ae869424c chalk-fix-tests.patch diff --git a/test.js b/test.js deleted file mode 100644 index 1e6d75e..0000000 --- a/test.js +++ /dev/null @@ -1,157 +0,0 @@ -'use strict'; -var assert = require('assert'); -var requireUncached = require('require-uncached'); -var resolveFrom = require('resolve-from'); -var semver = require('semver'); -var chalk = require('./'); - -describe('chalk', function () { - it('should style string', function () { - assert.equal(chalk.underline('foo'), '\u001b[4mfoo\u001b[24m'); - assert.equal(chalk.red('foo'), '\u001b[31mfoo\u001b[39m'); - assert.equal(chalk.bgRed('foo'), '\u001b[41mfoo\u001b[49m'); - }); - - it('should support applying multiple styles at once', function () { - assert.equal(chalk.red.bgGreen.underline('foo'), '\u001b[31m\u001b[42m\u001b[4mfoo\u001b[24m\u001b[49m\u001b[39m'); - assert.equal(chalk.underline.red.bgGreen('foo'), '\u001b[4m\u001b[31m\u001b[42mfoo\u001b[49m\u001b[39m\u001b[24m'); - }); - - it('should support nesting styles', function () { - assert.equal( - chalk.red('foo' + chalk.underline.bgBlue('bar') + '!'), - '\u001b[31mfoo\u001b[4m\u001b[44mbar\u001b[49m\u001b[24m!\u001b[39m' - ); - }); - - it('should support nesting styles of the same type (color, underline, bg)', function () { - assert.equal( - chalk.red('a' + chalk.yellow('b' + chalk.green('c') + 'b') + 'c'), - '\u001b[31ma\u001b[33mb\u001b[32mc\u001b[33mb\u001b[31mc\u001b[39m' - ); - }); - - it('should reset all styles with `.reset()`', function () { - assert.equal(chalk.reset(chalk.red.bgGreen.underline('foo') + 'foo'), '\u001b[0m\u001b[31m\u001b[42m\u001b[4mfoo\u001b[24m\u001b[49m\u001b[39mfoo\u001b[0m'); - }); - - it('should be able to cache multiple styles', function () { - var red = chalk.red; - var green = chalk.green; - var redBold = red.bold; - var greenBold = green.bold; - - assert.notEqual(red('foo'), green('foo')); - assert.notEqual(redBold('bar'), greenBold('bar')); - assert.notEqual(green('baz'), greenBold('baz')); - }); - - it('should alias gray to grey', function () { - assert.equal(chalk.grey('foo'), '\u001b[90mfoo\u001b[39m'); - }); - - it('should support variable number of arguments', function () { - assert.equal(chalk.red('foo', 'bar'), '\u001b[31mfoo bar\u001b[39m'); - }); - - it('should support falsy values', function () { - assert.equal(chalk.red(0), '\u001b[31m0\u001b[39m'); - }); - - it('don\'t output escape codes if the input is empty', function () { - assert.equal(chalk.red(), ''); - }); -}); - -describe('chalk on windows', function () { - var originalEnv; - var originalPlatform; - - // in node versions older than 0.12.x process.platform cannot be overridden - if (semver.lt(process.version, '0.12.0')) { - return; - } - - before(function () { - originalEnv = process.env; - originalPlatform = process.platform; - }); - - after(function () { - process.env = originalEnv; - Object.defineProperty(process, 'platform', {value: originalPlatform}); - }); - - beforeEach(function () { - process.env = {}; - Object.defineProperty(process, 'platform', {value: 'win32'}); - // since chalk internally modifies ansiStyles.blue.open, ansi-styles needs - // to be removed from the require cache for require-uncached to work - delete require.cache[resolveFrom(__dirname, 'ansi-styles')]; - }); - - it('should replace blue foreground color in cmd.exe', function () { - process.env.TERM = 'dumb'; - var chalkCtx = requireUncached('./'); - assert.equal(chalkCtx.blue('foo'), '\u001b[94mfoo\u001b[39m'); - }); - - it('shouldn\'t replace blue foreground color in xterm based terminals', function () { - process.env.TERM = 'xterm-256color'; - var chalkCtx = requireUncached('./'); - assert.equal(chalkCtx.blue('foo'), '\u001b[34mfoo\u001b[39m'); - }); - - it('should not apply dimmed styling on gray strings, see https://github.com/chalk/chalk/issues/58', function () { - process.env.TERM = 'dumb'; - var chalkCtx = requireUncached('./'); - assert.equal(chalkCtx.gray.dim('foo'), '\u001b[90mfoo\u001b[22m\u001b[39m'); - }); - - it('should apply dimmed styling on xterm compatible terminals', function () { - process.env.TERM = 'xterm'; - var chalkCtx = requireUncached('./'); - assert.equal(chalkCtx.gray.dim('foo'), '\u001b[90m\u001b[2mfoo\u001b[22m\u001b[39m'); - }); - - it('should apply dimmed styling on strings of other colors', function () { - process.env.TERM = 'dumb'; - var chalkCtx = requireUncached('./'); - assert.equal(chalkCtx.blue.dim('foo'), '\u001b[94m\u001b[2mfoo\u001b[22m\u001b[39m'); - }); -}); - -describe('chalk.enabled', function () { - it('should not output colors when manually disabled', function () { - chalk.enabled = false; - assert.equal(chalk.red('foo'), 'foo'); - chalk.enabled = true; - }); -}); - -describe('chalk.constructor', function () { - it('should create a isolated context where colors can be disabled', function () { - var ctx = new chalk.constructor({enabled: false}); - assert.equal(ctx.red('foo'), 'foo'); - assert.equal(chalk.red('foo'), '\u001b[31mfoo\u001b[39m'); - }); -}); - -describe('chalk.styles', function () { - it('should expose the styles as ANSI escape codes', function () { - assert.equal(chalk.styles.red.open, '\u001b[31m'); - }); -}); - -describe('chalk.hasColor()', function () { - it('should detect whether a string has color', function () { - assert(chalk.hasColor(chalk.green('foo'))); - assert(!chalk.hasColor(chalk.stripColor(chalk.green('foo')))); - }); -}); - -describe('chalk.stripColor()', function () { - it('should strip color from string', function () { - assert.equal(chalk.stripColor(chalk.underline.red.bgGreen('foo')), 'foo'); - }); -});