From 5416bb8ff5623fe9c13a1014d3888c989c349db2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:44:36 +0000 Subject: [PATCH 1/2] Initial plan From 12766104423beb2c9b480fc9f7fa9a0f938ab4d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:48:48 +0000 Subject: [PATCH 2/2] Explicitly import Handlebars in translations/index.ts instead of relying on global Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com> --- .../src/___tests__/translations/index.test.ts | 9 --------- plugin-hrm-form/src/translations/index.ts | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/plugin-hrm-form/src/___tests__/translations/index.test.ts b/plugin-hrm-form/src/___tests__/translations/index.test.ts index 5339f7b512..9f5552a70f 100644 --- a/plugin-hrm-form/src/___tests__/translations/index.test.ts +++ b/plugin-hrm-form/src/___tests__/translations/index.test.ts @@ -171,15 +171,6 @@ describe('Hierarchical Translations', () => { describe('lookupTranslation', () => { const mockManagerGetInstance = Manager.getInstance as jest.MockedFunction; - beforeAll(() => { - // eslint-disable-next-line global-require - (global as any).Handlebars = require('handlebars'); - }); - - afterAll(() => { - delete (global as any).Handlebars; - }); - afterEach(() => { jest.clearAllMocks(); }); diff --git a/plugin-hrm-form/src/translations/index.ts b/plugin-hrm-form/src/translations/index.ts index 42540dafb8..0423eb2852 100644 --- a/plugin-hrm-form/src/translations/index.ts +++ b/plugin-hrm-form/src/translations/index.ts @@ -14,6 +14,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see https://www.gnu.org/licenses/. */ +import Handlebars from 'handlebars'; import { Manager } from '@twilio/flex-ui'; import { getDefinitionVersions } from '../hrmConfig';