Skip to content

Commit c49929a

Browse files
committedJul 17, 2020
Merge branch 'release/v2.0.3' into develop
2 parents 9310731 + 648012f commit c49929a

File tree

7 files changed

+35
-32
lines changed

7 files changed

+35
-32
lines changed
 

‎bin/truwrap

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ var getStdin = _interopDefault(require('get-stdin'));
99
var updateNotifier = _interopDefault(require('update-notifier'));
1010
var commonTags = require('common-tags');
1111
var string = require('@thebespokepixel/string');
12+
var _merge = _interopDefault(require('lodash/merge'));
1213
var trucolor = require('trucolor');
13-
var deepAssign = _interopDefault(require('deep-assign'));
1414
var path = require('path');
1515
var terminalFeatures = _interopDefault(require('term-ng'));
1616
var columnify = _interopDefault(require('columnify'));
@@ -26,7 +26,7 @@ var _split = _interopDefault(require('lodash/split'));
2626
var _forEach = _interopDefault(require('lodash/forEach'));
2727

2828
const name = "truwrap";
29-
const version = "2.0.2";
29+
const version = "2.0.3";
3030
const description = "Smarter terminal text wrapping (handles 24bit color)";
3131
const author = "Mark Griffiths <mark@thebespokepixel.com> (http://thebespokepixel.com/)";
3232
const main = "index.js";
@@ -211,14 +211,14 @@ var pkg = {
211211
badges: badges
212212
};
213213

214-
const clr = deepAssign(trucolor.simple({
214+
const clr = _merge(trucolor.simple({
215215
format: 'sgr'
216216
}), trucolor.palette({
217217
format: 'sgr'
218-
}, {
218+
}), {
219219
bright: 'bold rgb(255,255,255)',
220220
dark: '#333'
221-
}));
221+
});
222222
const colorReplacer = new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer(/([a-zA-Z]+?)[:/|](.+)/, (match, colorName, content) => `${clr[colorName]}${content}${clr[colorName].out}`));
223223

224224
const tabRegex = /\t/g;

‎docs/index.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<title>truwrap 2.0.2 | Documentation</title>
5+
<title>truwrap 2.0.3 | Documentation</title>
66
<meta name='description' content='Smarter terminal text wrapping (handles 24bit color)'>
77
<meta name="viewport" content="width=device-width,initial-scale=1">
88
<link href="assets/css/ace.min.css" rel="stylesheet">
@@ -15,7 +15,7 @@
1515
<div id='split-left' class='overflow-auto fs0 height-viewport-100 sidebar'>
1616
<div class='py1 px2'>
1717
<h3 class="m0 no-anchor">truwrap</h3>
18-
<div class="mb1"><code>2.0.2</code></div>
18+
<div class="mb1"><code>2.0.3</code></div>
1919
<input
2020
placeholder="Filter"
2121
id="filter-input"
@@ -220,7 +220,7 @@ <h3 class='left m0 panel-title' id='truwrap'>
220220
</h3>
221221

222222

223-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L50-L218'>
223+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L50-L218'>
224224
<span>src/index.js</span>
225225
</a>
226226

@@ -383,7 +383,7 @@ <h3 class='left m0 panel-title' id='api'>
383383
</h3>
384384

385385

386-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L100-L167'>
386+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L100-L167'>
387387
<span>src/index.js</span>
388388
</a>
389389

@@ -432,7 +432,7 @@ <h3 class='left m0 panel-title' id='api'>
432432
<div class='clearfix'>
433433

434434

435-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L107-L113'>
435+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L107-L113'>
436436
<span>src/index.js</span>
437437
</a>
438438

@@ -495,7 +495,7 @@ <h3 class='left m0 panel-title' id='api'>
495495
<div class='clearfix'>
496496

497497

498-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L119-L119'>
498+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L119-L119'>
499499
<span>src/index.js</span>
500500
</a>
501501

@@ -558,7 +558,7 @@ <h3 class='left m0 panel-title' id='api'>
558558
<div class='clearfix'>
559559

560560

561-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L128-L134'>
561+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L128-L134'>
562562
<span>src/index.js</span>
563563
</a>
564564

@@ -644,7 +644,7 @@ <h3 class='left m0 panel-title' id='api'>
644644
<div class='clearfix'>
645645

646646

647-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L142-L145'>
647+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L142-L145'>
648648
<span>src/index.js</span>
649649
</a>
650650

@@ -722,7 +722,7 @@ <h3 class='left m0 panel-title' id='api'>
722722
<div class='clearfix'>
723723

724724

725-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L152-L155'>
725+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L152-L155'>
726726
<span>src/index.js</span>
727727
</a>
728728

@@ -785,7 +785,7 @@ <h3 class='left m0 panel-title' id='api'>
785785
<div class='clearfix'>
786786

787787

788-
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/c6b88b7540a9dfb28926cea12e733364d98ed92c/src/index.js#L163-L166'>
788+
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/93107316e86f7d437ce9a32d5b372b68636064cf/src/index.js#L163-L166'>
789789
<span>src/index.js</span>
790790
</a>
791791

‎index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ var commonTags = require('common-tags');
1111
var meta = _interopDefault(require('@thebespokepixel/meta'));
1212
var nSelector = require('@thebespokepixel/n-selector');
1313
var ansiRegex = _interopDefault(require('ansi-regex'));
14+
var _merge = _interopDefault(require('lodash/merge'));
1415
var trucolor = require('trucolor');
15-
var deepAssign = _interopDefault(require('deep-assign'));
1616
var fs = require('fs');
1717
var path = require('path');
1818
var _min = _interopDefault(require('lodash/min'));
@@ -178,14 +178,14 @@ function createWrapTool(options) {
178178
return new WrapTool(options);
179179
}
180180

181-
const clr = deepAssign(trucolor.simple({
181+
const clr = _merge(trucolor.simple({
182182
format: 'sgr'
183183
}), trucolor.palette({
184184
format: 'sgr'
185-
}, {
185+
}), {
186186
bright: 'bold rgb(255,255,255)',
187187
dark: '#333'
188-
}));
188+
});
189189
const colorReplacer = new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer(/([a-zA-Z]+?)[:/|](.+)/, (match, colorName, content) => `${clr[colorName]}${content}${clr[colorName].out}`));
190190

191191
const prefix = '\u001B]1337;File=inline=1;';

‎index.mjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { TemplateTag, replaceSubstitutionTransformer, stripIndent } from 'common
55
import meta from '@thebespokepixel/meta';
66
import { createSelector } from '@thebespokepixel/n-selector';
77
import ansiRegex from 'ansi-regex';
8+
import _merge from 'lodash/merge';
89
import { simple, palette } from 'trucolor';
9-
import deepAssign from 'deep-assign';
1010
import { statSync, readFileSync } from 'fs';
1111
import { join, extname, basename } from 'path';
1212
import _min from 'lodash/min';
@@ -172,14 +172,14 @@ function createWrapTool(options) {
172172
return new WrapTool(options);
173173
}
174174

175-
const clr = deepAssign(simple({
175+
const clr = _merge(simple({
176176
format: 'sgr'
177177
}), palette({
178178
format: 'sgr'
179-
}, {
179+
}), {
180180
bright: 'bold rgb(255,255,255)',
181181
dark: '#333'
182-
}));
182+
});
183183
const colorReplacer = new TemplateTag(replaceSubstitutionTransformer(/([a-zA-Z]+?)[:/|](.+)/, (match, colorName, content) => `${clr[colorName]}${content}${clr[colorName].out}`));
184184

185185
const prefix = '\u001B]1337;File=inline=1;';

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "truwrap",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "Smarter terminal text wrapping (handles 24bit color)",
55
"author": "Mark Griffiths <mark@thebespokepixel.com> (http://thebespokepixel.com/)",
66
"main": "index.js",
@@ -56,7 +56,6 @@
5656
"ansi-regex": "^5.0.0",
5757
"columnify": "^1.5.4",
5858
"common-tags": "^1.8.0",
59-
"deep-assign": "^3.0.0",
6059
"es6-promisify": "^6.1.1",
6160
"get-stdin": "^8.0.0",
6261
"lodash": "^4.17.19",
@@ -161,4 +160,4 @@
161160
]
162161
]
163162
}
164-
}
163+
}

‎src/lib/colour.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
│ truwrap colour │ Colour handling, here for optimisation
33
╰────────────────┴──────────────────────────────────────────────────────────── */
44

5+
import _ from 'lodash'
56
import {simple, palette} from 'trucolor'
6-
import deepAssign from 'deep-assign'
77
import {TemplateTag, replaceSubstitutionTransformer} from 'common-tags'
88

9-
export const clr = deepAssign(simple({format: 'sgr'}), palette({format: 'sgr'}, {
10-
bright: 'bold rgb(255,255,255)',
11-
dark: '#333'
12-
}))
9+
export const clr = _.merge(
10+
simple({format: 'sgr'}),
11+
palette({format: 'sgr'}),
12+
{
13+
bright: 'bold rgb(255,255,255)',
14+
dark: '#333'
15+
}
16+
)
1317

1418
export const colorReplacer = new TemplateTag(
1519
replaceSubstitutionTransformer(

0 commit comments

Comments
 (0)
Please sign in to comment.