Skip to content

Commit a2c2c4a

Browse files
committed
fix: update indexable-array package
1 parent 42d21fd commit a2c2c4a

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

package-lock.json

Lines changed: 19 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@typescript-plus/fast-memoize-decorator": "^0.1.0",
5555
"dotenv": "^8.2.0",
5656
"fast-memoize": "^2.5.2",
57-
"indexable-array": "^0.7.0",
57+
"indexable-array": "^0.7.3",
5858
"inflection": "^1.12.0",
5959
"json5": "^2.1.3",
6060
"lodash.get": "^4.4.2",

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ async function getQueryResultsFromDb(
337337
includeSchemasArray?: string[],
338338
excludeSchemasArray?: string[],
339339
includeSystemSchemas?: boolean
340-
): Promise<QueryResults> {
340+
// ): Promise<QueryResults> {
341+
): Promise<any> {
341342
const schemaRows = await getSchemas(client, { include: includeSchemasArray, exclude: excludeSchemasArray, system: includeSystemSchemas });
342343
const systemSchemaRows = await getSystemSchemas(client);
343344
const schemaOids = schemaRows.map((schema) => schema.oid);

src/util/helper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ export function caseTypeOf(input: string): CaseType {
112112
* @returns major version of given version.
113113
*/
114114
export function majorVersionOf(version: string): number {
115-
return Number(version.replace(/\..+$/, ""));
115+
const matched = version.match(/^\d+/);
116+
/* istanbul ignore if */
117+
if (matched === null) throw new Error(`Invalid version string: ${version}`);
118+
return Number(matched[0]);
116119
}
117120

118121
/**

0 commit comments

Comments
 (0)