From 0044d6777d7c142da89f1f523d6b89df481730d0 Mon Sep 17 00:00:00 2001 From: Jairo Panduro Date: Tue, 28 Jul 2026 16:26:17 +0200 Subject: [PATCH] fix(deps): replace @bigcommerce/handlebars-v4 with npm alias Drop the @bigcommerce/handlebars-v4 wrapper dependency in favor of an npm alias (handlebars-v4 -> handlebars@4.7.9). Modern npm tooling supports aliases, so a separately published package is no longer needed to load handlebars v3 and v4 side by side. Publishing this as a release removes the wrapper from consumers' transitive dependency tree. Runtime is imported via the handlebars-v4/runtime.js subpath since the bare handlebars export has no .runtime property. Refs TRAC-961 --- index.js | 4 ++-- package.json | 2 +- spec/helpers/3p/utils/lib/createFrame.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 4f9d3a0c..c29079df 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ 'use strict'; const HandlebarsV3 = require('handlebars'); const HandlebarsV3Runtime = require('handlebars/runtime.js'); -const HandlebarsV4 = require('@bigcommerce/handlebars-v4'); -const HandlebarsV4Runtime = require('@bigcommerce/handlebars-v4').runtime; +const HandlebarsV4 = require('handlebars-v4'); +const HandlebarsV4Runtime = require('handlebars-v4/runtime.js'); const helpers = require('./helpers'); const AppError = require('./lib/appError'); diff --git a/package.json b/package.json index 0a730fe4..d006fe09 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,9 @@ }, "homepage": "https://github.com/bigcommerce/paper-handlebars", "dependencies": { - "@bigcommerce/handlebars-v4": "4.8.1", "chrono-node": "2.8.0", "handlebars": "3.0.8", + "handlebars-v4": "npm:handlebars@4.7.9", "he": "^1.2.0", "moment": "^2.29.4", "remarkable": "^2.0.1", diff --git a/spec/helpers/3p/utils/lib/createFrame.js b/spec/helpers/3p/utils/lib/createFrame.js index 83faa1c9..6c1da23e 100644 --- a/spec/helpers/3p/utils/lib/createFrame.js +++ b/spec/helpers/3p/utils/lib/createFrame.js @@ -7,7 +7,7 @@ const describe = lab.describe; const createFrame = require('../../../../../helpers/3p/utils/lib/createFrame'); -var hbs = require('@bigcommerce/handlebars-v4'); +var hbs = require('handlebars-v4'); describe('createFrame', function () { it('should create a reference to _parent:', function (done) {