Skip to content

Commit a759265

Browse files
committed
Update code
1 parent 3f0470a commit a759265

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/commands/update.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'use strict';
22
const { sort } = require('semver');
3-
const path = require('path');
3+
const path = require('node:path');
44
const GitHubUpdater = require('../github-updater');
55
const UpdateCommand =
66
require('@oclif/plugin-update/lib/commands/update').default;
7-
// const { printTable } = require('@oclif/table');
87

98
class GithubUpdatecommand extends UpdateCommand {
109
async run() {
10+
const { printTable } = await import('@oclif/table');
1111
const { args, flags } = await this.parse(UpdateCommand);
1212
const updater = new GitHubUpdater(this.config);
1313
if (flags.available) {
@@ -22,14 +22,13 @@ class GithubUpdatecommand extends UpdateCommand {
2222
return { version, location };
2323
});
2424

25-
// printTable({
26-
// columns: [
27-
// { key: 'version' },
28-
// { key: 'location' },
29-
// ],
30-
// data: table,
31-
// });
32-
console.log(table);
25+
printTable({
26+
columns: [
27+
{ key: 'version' },
28+
{ key: 'location' },
29+
],
30+
data: table,
31+
});
3332
return;
3433
}
3534

tsconfig.json renamed to tsconfig.esm.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"allowJs": true,
34
"declaration": true,
45
"module": "Node16",
56
"outDir": "dist",

0 commit comments

Comments
 (0)