From d9c0b4799d02cd55c74f0552772525aa9f13cff2 Mon Sep 17 00:00:00 2001 From: Jason Grey Date: Thu, 27 Aug 2026 16:55:21 -0500 Subject: [PATCH] fix: include entity table in npm packages --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ javascript/package.json | 7 ++++--- package.json | 5 +++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8365f4d..6d4ed6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,28 @@ jobs: working-directory: javascript run: node test.js + - name: Verify installable packages + run: | + mkdir -p "$RUNNER_TEMP/root-pack" "$RUNNER_TEMP/javascript-pack" + mkdir -p "$RUNNER_TEMP/root-install" "$RUNNER_TEMP/javascript-install" + + npm pack --pack-destination "$RUNNER_TEMP/root-pack" + (cd javascript && npm pack --pack-destination "$RUNNER_TEMP/javascript-pack") + + ( + cd "$RUNNER_TEMP/root-install" + npm init -y + npm install "$RUNNER_TEMP/root-pack/"*.tgz --ignore-scripts --no-audit --no-fund + node --input-type=module -e 'import("@htmltrust/canonicalization").then(({ normalizeText }) => { if (normalizeText("A—B") !== "A-B") process.exit(1); })' + ) + + ( + cd "$RUNNER_TEMP/javascript-install" + npm init -y + npm install "$RUNNER_TEMP/javascript-pack/"*.tgz --ignore-scripts --no-audit --no-fund + node --input-type=module -e 'import("@htmltrust/canonicalization").then(({ normalizeText }) => { if (normalizeText("A—B") !== "A-B") process.exit(1); })' + ) + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: javascript-package diff --git a/javascript/package.json b/javascript/package.json index 1b4978c..43754f0 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,7 +1,7 @@ { "name": "@htmltrust/canonicalization", - "version": "0.2.1", - "description": "HTMLTrust canonical text normalization, signature verification, and keyid resolution \u2014 zero dependencies, browser + Node.js", + "version": "0.2.2", + "description": "HTMLTrust canonical text normalization, signature verification, and key resolution for browsers and Node.js", "type": "module", "main": "index.js", "exports": { @@ -9,7 +9,8 @@ }, "files": [ "index.js", - "index.d.ts" + "index.d.ts", + "entities.js" ], "keywords": [ "htmltrust", diff --git a/package.json b/package.json index eab4154..b1f69a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@htmltrust/canonicalization", - "version": "0.2.1", + "version": "0.2.2", "description": "HTMLTrust canonical text normalization, signature verification, and key resolution for browsers and Node.js", "type": "module", "main": "javascript/index.js", @@ -10,7 +10,8 @@ "types": "javascript/index.d.ts", "files": [ "javascript/index.js", - "javascript/index.d.ts" + "javascript/index.d.ts", + "javascript/entities.js" ], "keywords": [ "htmltrust",