Skip to content

Commit

Permalink
rewrite to esm, update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jul 21, 2020
1 parent fb12aa1 commit 391e5b1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "8.4.0",
"ansi-regex": "5.0.0",
"colorette": "1.2.0",
"colorette": "1.2.1",
"del": "5.1.0",
"eslint": "7.4.0",
"eslint": "7.5.0",
"eslint-config-silverwind": "16.0.1",
"execa": "4.0.3",
"hosted-git-info": "3.0.5",
Expand All @@ -43,12 +43,12 @@
"node-fetch": "2.6.0",
"rc": "1.2.8",
"registry-auth-token": "4.2.0",
"restana": "4.6.2",
"rollup": "2.21.0",
"restana": "4.7.0",
"rollup": "2.22.1",
"rollup-plugin-hashbang": "2.2.2",
"rollup-plugin-terser": "6.1.0",
"semver": "7.3.2",
"tempy": "0.5.0",
"tempy": "0.6.0",
"text-table": "0.2.0",
"versions": "8.4.2"
},
Expand Down
32 changes: 17 additions & 15 deletions updates.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/usr/bin/env node
"use strict";

const ansiRegex = require("ansi-regex")();
const dns = require("dns");
const fetch = require("make-fetch-happen");
const minimist = require("minimist");
const rat = require("registry-auth-token");
const rc = require("rc");
const ru = require("registry-auth-token/registry-url");
const semver = require("semver");
const textTable = require("text-table");
const {cwd: cwdFn, stdout, argv, env, exit} = require("process");
const {fromUrl} = require("hosted-git-info");
const {join, dirname} = require("path");
const {lstatSync, readFileSync, truncateSync, writeFileSync, accessSync} = require("fs");
const {platform} = require("os");
import ansiRegex from "ansi-regex";
import dns from "dns";
import fetch from "make-fetch-happen";
import minimist from "minimist";
import rat from "registry-auth-token";
import rc from "rc";
import ru from "registry-auth-token/registry-url";
import semver from "semver";
import textTable from "text-table";
import {cwd as cwdFn, stdout, argv, env, exit} from "process";
import {fromUrl} from "hosted-git-info";
import {join, dirname} from "path";
import {lstatSync, readFileSync, truncateSync, writeFileSync, accessSync} from "fs";
import {platform} from "os";

env.NODE_ENV = "production";

Expand Down Expand Up @@ -471,9 +471,11 @@ function formatDeps() {
]);
}

const ansiRe = ansiRegex();

return textTable(arr, {
hsep: " ",
stringLength: str => str.replace(ansiRegex, "").length,
stringLength: str => str.replace(ansiRe, "").length,
});
}

Expand Down

0 comments on commit 391e5b1

Please sign in to comment.