fix(plugin-tools): trim leading underscores from filenames
This commit is contained in:
parent
23d390e602
commit
4e2a27ffeb
1 changed files with 2 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ export const getTimestampPrefix = () => new Date().toISOString().replaceAll(/[-:
|
|||
*/
|
||||
export const sanitizeMigrationName = (name: string) =>
|
||||
name
|
||||
.replaceAll(/[\W/\\:|*?'"<>]+/g, '_')
|
||||
.replaceAll(/[\W/\\:|*?'"<>_]+/g, '_')
|
||||
.trim()
|
||||
.replace(/_$/, '')
|
||||
.replace(/^_|_$/, '')
|
||||
.toLocaleLowerCase();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue