Skip to content

Commit

Permalink
fix: update indexable-array package
Browse files Browse the repository at this point in the history
  • Loading branch information
ozum committed Feb 12, 2024
1 parent 42d21fd commit a2c2c4a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
24 changes: 19 additions & 5 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@typescript-plus/fast-memoize-decorator": "^0.1.0",
"dotenv": "^8.2.0",
"fast-memoize": "^2.5.2",
"indexable-array": "^0.7.0",
"indexable-array": "^0.7.3",
"inflection": "^1.12.0",
"json5": "^2.1.3",
"lodash.get": "^4.4.2",
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ async function getQueryResultsFromDb(
includeSchemasArray?: string[],
excludeSchemasArray?: string[],
includeSystemSchemas?: boolean
): Promise<QueryResults> {
// ): Promise<QueryResults> {
): Promise<any> {
const schemaRows = await getSchemas(client, { include: includeSchemasArray, exclude: excludeSchemasArray, system: includeSystemSchemas });
const systemSchemaRows = await getSystemSchemas(client);
const schemaOids = schemaRows.map((schema) => schema.oid);
Expand Down
5 changes: 4 additions & 1 deletion src/util/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export function caseTypeOf(input: string): CaseType {
* @returns major version of given version.
*/
export function majorVersionOf(version: string): number {
return Number(version.replace(/\..+$/, ""));
const matched = version.match(/^\d+/);
/* istanbul ignore if */
if (matched === null) throw new Error(`Invalid version string: ${version}`);
return Number(matched[0]);
}

/**
Expand Down

0 comments on commit a2c2c4a

Please sign in to comment.