Skip to content

Commit

Permalink
Merge pull request #10 from cto-af/update-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
hildjj authored Sep 9, 2024
2 parents 19e4df8 + 5d3a2b5 commit 1af53e9
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 194 deletions.
9 changes: 7 additions & 2 deletions bin/linewrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import fs from 'fs';
import os from 'os';
import {parseArgsWithHelp} from 'minus-h';

export const DEFAULTS = {
width: process.stdout.columns ?? 80,
};

/**
* @type {Parameters<generateHelp>[0]}
*/
Expand Down Expand Up @@ -121,7 +125,7 @@ const config = {
width: {
short: 'w',
type: 'string',
default: String(process.stdout.columns ?? 80),
default: String(DEFAULTS.width),
argumentName: 'columns',
description: 'maximum line length',
},
Expand Down Expand Up @@ -177,11 +181,12 @@ export async function main(
options,
process = {exit, stdin, stdout, stderr}
) {
config.options.width.default = String(DEFAULTS.width);
const {values, positionals} = parseArgsWithHelp({
...config,
...extraConfig,
}, {
width: config.options.width.default,
width: DEFAULTS.width,
...options,
});

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
"license": "MIT",
"repository": "cto-af/linewrap-cli",
"dependencies": {
"@cto.af/linewrap": "2.1.0",
"@cto.af/linewrap": "2.1.3",
"minus-h": "2.1.0"
},
"devDependencies": {
"@cto.af/eslint-config": "4.1.5",
"@types/node": "22.1.0",
"@cto.af/eslint-config": "4.1.6",
"@types/node": "22.5.4",
"c8": "10.1.2",
"eslint": "9.8.0",
"eslint": "9.10.0",
"eslint-plugin-mocha": "10.5.0",
"mocha": "10.7.0"
"mocha": "10.7.3"
},
"packageManager": "pnpm@9.7.0",
"packageManager": "pnpm@9.10.0",
"engines": {
"node": ">= 18"
}
Expand Down
Loading

0 comments on commit 1af53e9

Please sign in to comment.