From 5d93b4598f6aefaca2c9c929b90b49a5cd14e307 Mon Sep 17 00:00:00 2001 From: jroytman Date: Tue, 14 Oct 2025 20:15:56 -0700 Subject: [PATCH] switching to @profoundlogic/hogan --- package-lock.json | 80 +++++++++++++++++++------------------------- package.json | 2 +- scripts/hulk.ts | 8 ++--- src/hoganjs-utils.ts | 2 +- 4 files changed, 41 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ec34605..d6ed6f6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "3.0.0-beta.1", "license": "MIT", "dependencies": { - "diff": "^7.0.0", - "hogan.js": "3.0.2" + "@profoundlogic/hogan": "^3.0.4", + "diff": "^7.0.0" }, "devDependencies": { "@eslint/js": "^9.17.0", @@ -2663,6 +2663,39 @@ "node": ">= 8" } }, + "node_modules/@profoundlogic/hogan": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@profoundlogic/hogan/-/hogan-3.0.4.tgz", + "integrity": "sha512-pmNVGuooS30Mm7YbZd5T7E5zYVO6D5Ct91sn4T39mUvMUc3sCGridcnhAufL1/Bz2QzAtzEn0agNrdk3+5yWzw==", + "license": "Apache-2.0", + "dependencies": { + "nopt": "1.0.10" + }, + "bin": { + "hulk": "bin/hulk" + } + }, + "node_modules/@profoundlogic/hogan/node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "license": "ISC" + }, + "node_modules/@profoundlogic/hogan/node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "license": "MIT", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -8695,49 +8728,6 @@ "node": ">=12.0.0" } }, - "node_modules/hogan.js": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/hogan.js/-/hogan.js-3.0.2.tgz", - "integrity": "sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==", - "dependencies": { - "mkdirp": "0.3.0", - "nopt": "1.0.10" - }, - "bin": { - "hulk": "bin/hulk" - } - }, - "node_modules/hogan.js/node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "license": "ISC" - }, - "node_modules/hogan.js/node_modules/mkdirp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", - "integrity": "sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", - "license": "MIT/X11", - "engines": { - "node": "*" - } - }, - "node_modules/hogan.js/node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "license": "MIT", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, "node_modules/hpack.js": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", diff --git a/package.json b/package.json index daf3f52c..dc48fd07 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ }, "dependencies": { "diff": "^7.0.0", - "hogan.js": "3.0.2" + "@profoundlogic/hogan": "^3.0.4" }, "optionalDependencies": { "highlight.js": "11.9.0" diff --git a/scripts/hulk.ts b/scripts/hulk.ts index 019a36f2..0d2ac8fd 100755 --- a/scripts/hulk.ts +++ b/scripts/hulk.ts @@ -16,7 +16,7 @@ import * as path from 'path'; import * as fs from 'fs'; -import * as hogan from 'hogan.js'; +import * as hogan from '@profoundlogic/hogan'; import nopt from 'nopt'; import * as mkderp from 'mkdirp'; @@ -118,7 +118,7 @@ function wrap(file: string, name: string, openedFile: string): string { case 'amd': return `define(${ !options.outputdir ? `"${path.join(path.dirname(file), name)}", ` : '' - }["hogan.js"], function(Hogan) { return ${hoganTemplateString}; });`; + }["@profoundlogic/hogan"], function(Hogan) { return ${hoganTemplateString}; });`; case 'node': // If we have a template per file the export will expose the template directly @@ -139,12 +139,12 @@ function prepareOutput(content: string): string { case 'node': return `(function() { if (!!!global.${variableName}) global.${variableName} = {}; -var Hogan = require("hogan.js"); +var Hogan = require("@profoundlogic/hogan); ${content} ${!options.outputdir ? `module.exports = global.${variableName};\n` : ''})();`; case 'ts': - return `import * as Hogan from "hogan.js"; + return `import * as Hogan from "@profoundlogic/hogan"; type CompiledTemplates = { [name: string]: Hogan.Template }; export const ${variableName}: CompiledTemplates = {}; ${content}`; diff --git a/src/hoganjs-utils.ts b/src/hoganjs-utils.ts index 4b0fbc71..9e3e0c7c 100644 --- a/src/hoganjs-utils.ts +++ b/src/hoganjs-utils.ts @@ -1,4 +1,4 @@ -import * as Hogan from 'hogan.js'; +import * as Hogan from '@profoundlogic/hogan'; import { defaultTemplates } from './diff2html-templates';