Skip to content

Commit

Permalink
Merge pull request #1545 from Automattic/replace/json2csv
Browse files Browse the repository at this point in the history
chore(deps): replace deprecated `json2csv` with `@json2csv/plainjs`
  • Loading branch information
sjinks authored Nov 7, 2023
2 parents 5e4fbb2 + 7916def commit 181b82a
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
2 changes: 1 addition & 1 deletion __tests__/bin/vip-logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe( 'getLogs', () => {
expect( console.log ).toHaveBeenCalledTimes( 1 );
expect( console.log ).toHaveBeenCalledWith(
/* eslint-disable max-len */
`"timestamp","message"${ os.EOL }"2021-11-05T20:18:36.234041811Z","My container message 1"${ os.EOL }"2021-11-09T20:47:07.301221112Z","My container message 2 has ""double quotes"", 'single quotes', commas, multiple${ os.EOL }lines${ os.EOL }, and tabs"`
`"timestamp","message"\n"2021-11-05T20:18:36.234041811Z","My container message 1"\n"2021-11-09T20:47:07.301221112Z","My container message 2 has ""double quotes"", 'single quotes', commas, multiple${ os.EOL }lines${ os.EOL }, and tabs"`
/* eslint-enable max-len */
);

Expand Down
4 changes: 1 addition & 3 deletions __tests__/bin/vip-slowlogs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os from 'os';

import { getSlowlogs } from '../../src/bin/vip-slowlogs';
import * as slowlogsLib from '../../src/lib/app-slowlogs/app-slowlogs';
import * as exit from '../../src/lib/cli/exit';
Expand Down Expand Up @@ -225,7 +223,7 @@ describe( 'getSlowlogs', () => {
expect( console.log ).toHaveBeenCalledTimes( 1 );
expect( console.log ).toHaveBeenCalledWith(
/* eslint-disable max-len */
`"timestamp","rows sent","rows examined","query time","request uri","query"${ os.EOL }"2021-11-05T20:18:36.234041811Z",,,,,"SELECT * FROM wp_posts"${ os.EOL }"2021-11-09T20:47:07.301221112Z",,,,,"SELECT * FROM wp_posts"`
`"timestamp","rows sent","rows examined","query time","request uri","query"\n"2021-11-05T20:18:36.234041811Z",,,,,"SELECT * FROM wp_posts"\n"2021-11-09T20:47:07.301221112Z",,,,,"SELECT * FROM wp_posts"`
/* eslint-enable max-len */
);

Expand Down
117 changes: 41 additions & 76 deletions npm-shrinkwrap.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
"@types/ejs": "^3.1.4",
"@types/jest": "^29.5.7",
"@types/js-yaml": "^4.0.8",
"@types/json2csv": "^5.0.5",
"@types/node-fetch": "^2.6.8",
"@types/proxy-from-env": "^1.0.3",
"@types/semver": "^7.5.4",
Expand All @@ -138,6 +137,7 @@
"@apollo/client": "3.3.6",
"@automattic/vip-go-preflight-checks": "^2.0.16",
"@automattic/vip-search-replace": "^1.1.1",
"@json2csv/plainjs": "^7.0.3",
"args": "5.0.3",
"chalk": "4.1.2",
"check-disk-space": "3.4.0",
Expand All @@ -154,7 +154,6 @@
"https-proxy-agent": "^5.0.1",
"ini": "2.0.0",
"js-yaml": "^4.1.0",
"json2csv": "5.0.7",
"jwt-decode": "4.0.0",
"lando": "github:automattic/lando-cli.git#ba488a4",
"node-fetch": "^2.6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/cli/format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Parser } from '@json2csv/plainjs';
import chalk from 'chalk';
import Table from 'cli-table';
import { Parser } from 'json2csv';

import { StepStatus } from './progress';

Expand Down

0 comments on commit 181b82a

Please sign in to comment.