Skip to content

Commit

Permalink
Update colors to maintained version
Browse files Browse the repository at this point in the history
  • Loading branch information
DABH committed Feb 17, 2022
1 parent 90c7438 commit 3a5537a
Show file tree
Hide file tree
Showing 10 changed files with 4,506 additions and 4,210 deletions.
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');

This comment has been minimized.

Copy link
@speedytwenty

speedytwenty Mar 24, 2022

Collaborator

This is a typo. Not sure how the build is passing with this.

This comment has been minimized.

Copy link
@DABH

DABH Mar 24, 2022

Author Contributor

Omg 🤦‍♂️ Please let me know if you want me to make a PR, I’m so sorry


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.

0 comments on commit 3a5537a

Please sign in to comment.