Fix buildMigrationNamespaceResolver to use isValidSuffix(...) instead of hard-coded check

This commit is contained in:
Garrett Mills 2022-07-09 11:03:50 -05:00
parent 7d3fde85eb
commit 6ca4bc1151
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.10.3", "version": "0.10.4",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -67,7 +67,7 @@ export class Migrations extends CanonicalInstantiable<Migration> {
const namespace: {[key: string]: Migration} = {} const namespace: {[key: string]: Migration} = {}
for await ( const entry of basePath.walk() ) { for await ( const entry of basePath.walk() ) {
if ( !entry.endsWith(this.suffix) ) { if ( !this.isValidSuffix(entry) ) {
this.logging.debug(`buildMigrationNamespaceResolver - Skipping file with invalid suffix: ${entry}`) this.logging.debug(`buildMigrationNamespaceResolver - Skipping file with invalid suffix: ${entry}`)
continue continue
} }