Skip to content

Commit

Permalink
fix(deps): update dependency tar to v7 (#5678)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency tar to v7

* refactor: fix import

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gao Sun <gao@silverhand.io>
  • Loading branch information
renovate[bot] and gao-sun authored Apr 24, 2024
1 parent 0359cba commit 09a1b24
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 50 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"pg-protocol": "^1.6.0",
"roarr": "^7.11.0",
"semver": "^7.3.8",
"tar": "^6.2.1",
"tar": "^7.0.0",
"typescript": "^5.3.3",
"yargs": "^17.6.0",
"zod": "^3.22.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/connector/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import chalk from 'chalk';
import { got } from 'got';
import pLimit from 'p-limit';
import pRetry from 'p-retry';
import tar from 'tar';
import { extract } from 'tar';
import { z } from 'zod';

import { connectorDirectory, coreDirectory } from '../../constants.js';
Expand Down Expand Up @@ -102,7 +102,7 @@ export const addConnectorsToPath = async (cwd: string, packageNames: string[]) =

await fs.rm(packageDirectory, { force: true, recursive: true });
await fs.mkdir(packageDirectory, { recursive: true });
await tar.extract({ cwd: packageDirectory, file: tarPath, strip: 1 });
await extract({ cwd: packageDirectory, file: tarPath, strip: 1 });
await fs.unlink(tarPath);

consoleLog.succeed(`Added ${chalk.green(name)} v${version}`);
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/install/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import chalk from 'chalk';
import { got, RequestError } from 'got';
import inquirer from 'inquirer';
import * as semver from 'semver';
import tar from 'tar';
import { extract } from 'tar';

import { defaultPath } from '../../constants.js';
import { createPoolAndDatabaseIfNeeded } from '../../database.js';
Expand Down Expand Up @@ -140,7 +140,7 @@ export const decompress = async (toPath: string, tarPath: string) => {
const run = async () => {
try {
await fs.mkdir(toPath);
await tar.extract({ file: tarPath, cwd: toPath, strip: 1 });
await extract({ file: tarPath, cwd: toPath, strip: 1 });
} catch (error: unknown) {
consoleLog.fatal(error);
}
Expand Down
151 changes: 106 additions & 45 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 09a1b24

Please sign in to comment.