Skip to content

Commit

Permalink
Revert "Update lodash usages"
Browse files Browse the repository at this point in the history
This reverts commit ee20ee0.
  • Loading branch information
SferaDev committed Sep 19, 2024
1 parent ee20ee0 commit b6c256f
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 26 deletions.
10 changes: 8 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
"enquirer": "^2.4.1",
"env-editor": "^1.1.0",
"ini": "^5.0.0",
"lodash": "^4.17.21",
"lodash.compact": "^3.0.1",
"lodash.get": "^4.4.2",
"lodash.keyby": "^4.6.0",
"lodash.set": "^4.3.2",
"node-fetch": "^3.3.2",
"open": "^10.1.0",
"prompts": "^2.4.2",
Expand All @@ -61,7 +64,10 @@
"devDependencies": {
"@babel/types": "^7.25.6",
"@types/babel__core": "^7.20.5",
"@types/lodash": "^4.17.7",
"@types/lodash.compact": "^3.0.9",
"@types/lodash.get": "^4.4.9",
"@types/lodash.keyby": "^4.6.9",
"@types/lodash.set": "^4.3.9",
"@types/relaxed-json": "^1.0.4",
"@types/text-table": "^0.2.5",
"@types/tmp": "^0.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/config/get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseCommand } from '../../base.js';
import { get } from 'lodash';
import get from 'lodash.get';
import chalk from 'chalk';
import { Args } from '@oclif/core';

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/diff/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Args } from '@oclif/core';
import { BaseCommand } from '../../base.js';
import { getLocalMigrationFiles } from '../../migrations/files.js';
import { buildMigrationDiff } from '../../utils/diff.js';
import { compact } from 'lodash';
import compact from 'lodash.compact';

export default class Diff extends BaseCommand<typeof Diff> {
static description = 'Compare two local or remote branches';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/import/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
xataColumnTypeToPgRollComment
} from '../../migrations/pgroll.js';
import { compareSchemas } from '../../utils/compareSchema.js';
import { keyBy } from 'lodash';
import keyBy from 'lodash.keyby';

const ERROR_CONSOLE_LOG_LIMIT = 200;
const ERROR_LOG_FILE = 'errors.log';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ModuleType, parseSchemaFile } from '@xata.io/codegen';
import chalk from 'chalk';
import dotenv from 'dotenv';
import { access, readFile, writeFile } from 'fs/promises';
import { compact } from 'lodash';
import compact from 'lodash.compact';
import path, { extname } from 'path';
import which from 'which';
import { createAPIKeyThroughWebUI } from '../../auth-server.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import z from 'zod';
import { set } from 'lodash';
import set from 'lodash.set';

export const projectConfigSchema = z.object({
databaseURL: z.string(),
Expand Down
6 changes: 4 additions & 2 deletions packages/importer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
"@xata.io/client": "^0.30.0",
"any-date-parser": "^1.5.4",
"json5": "^2.2.3",
"lodash": "^4.17.21",
"lodash.chunk": "^4.2.0",
"lodash.pick": "^4.4.0",
"p-queue": "^8.0.1",
"papaparse": "^5.4.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/lodash": "^4.17.7",
"@types/lodash.chunk": "^4.2.9",
"@types/lodash.pick": "^4.4.9",
"@types/papaparse": "^5.3.14",
"lodash": "^4.17.21"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/importer/src/csvStreamParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { chunk as chunkArray } from 'lodash';
import chunkArray from 'lodash.chunk';
import PQueue from 'p-queue';
import Papa, { Parser, ParseResult } from 'papaparse';
import { metaToParseMeta, papaResultToJson, parseCsvOptionsToPapaOptions } from './parsers/csvParser';
Expand Down
2 changes: 1 addition & 1 deletion packages/importer/src/parsers/csvParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { pick } from 'lodash';
import pick from 'lodash.pick';
import CSV, { ParseConfig } from 'papaparse';
import { ParseCsvOptions, ParseMeta, ParseResults } from '../types';
import { parseJson } from './jsonParser';
Expand Down
129 changes: 114 additions & 15 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 b6c256f

Please sign in to comment.