Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update colors to maintained version #263

Merged
merged 1 commit into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/basic-usage-examples.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Table = require('../src/table');
const colors = require('colors/safe');
const colors = require('@colors/colors/safe');

module.exports = function (runTest) {
function it(name, fn) {
Expand Down
2 changes: 1 addition & 1 deletion examples/col-and-row-span-examples.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Table = require('../src/table');
const colors = require('colors/safe');
const colors = require('@colors/colors/safe');

module.exports = function (runTest) {
function it(name, fn) {
Expand Down
2 changes: 1 addition & 1 deletion lib/print-example.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env jest */
/* eslint-disable no-console */

const colors = require('colors/safe');
const colors = require('@colors/colors/safe');
const fs = require('fs');

function logExample(fn) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"prettier": "2.3.2"
},
"optionalDependencies": {
"colors": "1.4.0"
"@colors/colors": "1.5.0"
},
"scripts": {
"changelog": "lerna-changelog",
Expand Down
2 changes: 1 addition & 1 deletion src/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class Cell {
wrapWithStyleColors(styleProperty, content) {
if (this[styleProperty] && this[styleProperty].length) {
try {
let colors = require('colors/safe');
let colors = require('@colors/colors/safe');
for (let i = this[styleProperty].length - 1; i >= 0; i--) {
colors = colors[this[styleProperty][i]];
}
Expand Down
2 changes: 1 addition & 1 deletion test/cell-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('Cell', function () {
const colors = require('colors');
const colors = require('@colors/colors');
const Cell = require('../src/cell');
const { ColSpanCell, RowSpanCell } = Cell;
const { mergeOptions } = require('../src/utils');
Expand Down
2 changes: 1 addition & 1 deletion test/table-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('@api Table ', function () {
const Table = require('..');
const colors = require('colors/safe');
const colors = require('@color/colors/safe');

it('wordWrap with colored text', function () {
let table = new Table({ style: { border: [], head: [] }, wordWrap: true, colWidths: [7, 9] });
Expand Down
2 changes: 1 addition & 1 deletion test/utils-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('utils', function () {
const colors = require('colors/safe');
const colors = require('@colors/colors/safe');
const utils = require('../src/utils');

const { strlen, repeat, pad, truncate, mergeOptions, wordWrap } = utils;
Expand Down
2 changes: 1 addition & 1 deletion test/verify-legacy-compatibility-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
});

function commonTests(Table) {
const colors = require('colors/safe');
const colors = require('@colors/colors/safe');

it('empty table has a width of 0', function () {
let table = new Table();
Expand Down
8,698 changes: 4,497 additions & 4,201 deletions yarn.lock

Large diffs are not rendered by default.