From 6f9656884ecc2aa41d49af47460c9ee666da15e0 Mon Sep 17 00:00:00 2001 From: Steve Desmond Date: Thu, 28 Nov 2024 16:46:32 -0500 Subject: [PATCH] Make file extension matcher read-only --- core/src/IO/FileSystem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/IO/FileSystem.ts b/core/src/IO/FileSystem.ts index 568b796b..40f32c74 100644 --- a/core/src/IO/FileSystem.ts +++ b/core/src/IO/FileSystem.ts @@ -6,7 +6,7 @@ export default class FileSystem { constructor(private readonly fs: typeof fs_promises) { } - private static matchExtension: RegExp = new RegExp(/\.(\w+)$/); + private static readonly matchExtension: RegExp = new RegExp(/\.(\w+)$/); static extension(file: string) { const match = this.matchExtension.exec(file);