@holmdigital/engine 3.3.9 → 3.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,7 +260,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
260
260
  return false;
261
261
  }
262
262
  function getEngineVersion() {
263
- return "3.3.9";
263
+ return "3.3.10";
264
264
  }
265
265
  function getStandardsVersion() {
266
266
  try {
@@ -987,7 +987,12 @@ function resolveNationalLawReference(country, sector, lang = "en") {
987
987
  }
988
988
  }
989
989
  const law = getNationalLawForSector(country, sector);
990
- if (law) return `${law.fullName} (${law.law})`;
990
+ if (law) {
991
+ const shortName = law.law.trim();
992
+ const longName = law.fullName.trim();
993
+ const redundant = longName === shortName || longName.startsWith(shortName);
994
+ return redundant ? longName : `${longName} (${shortName})`;
995
+ }
991
996
  const langKey = lang.split("-")[0];
992
997
  return NATIONAL_LAW_FALLBACK[langKey] ?? NATIONAL_LAW_FALLBACK.en;
993
998
  }
package/dist/cli/index.js CHANGED
@@ -1620,7 +1620,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
1620
1620
  return false;
1621
1621
  }
1622
1622
  function getEngineVersion() {
1623
- return "3.3.9";
1623
+ return "3.3.10";
1624
1624
  }
1625
1625
  function getStandardsVersion() {
1626
1626
  try {
@@ -3212,7 +3212,12 @@ function resolveNationalLawReference(country, sector, lang = "en") {
3212
3212
  }
3213
3213
  }
3214
3214
  const law = (0, import_standards3.getNationalLawForSector)(country, sector);
3215
- if (law) return `${law.fullName} (${law.law})`;
3215
+ if (law) {
3216
+ const shortName = law.law.trim();
3217
+ const longName = law.fullName.trim();
3218
+ const redundant = longName === shortName || longName.startsWith(shortName);
3219
+ return redundant ? longName : `${longName} (${shortName})`;
3220
+ }
3216
3221
  const langKey = lang.split("-")[0];
3217
3222
  return NATIONAL_LAW_FALLBACK[langKey] ?? NATIONAL_LAW_FALLBACK.en;
3218
3223
  }
@@ -8,7 +8,7 @@ import {
8
8
  generateStatementContent,
9
9
  getEngineVersion,
10
10
  isBadgeWithheldByRobustness
11
- } from "../chunk-JRUQBEGG.mjs";
11
+ } from "../chunk-ROGZGHH6.mjs";
12
12
  import {
13
13
  groupReportsByRule,
14
14
  impactBreakdown,
package/dist/index.js CHANGED
@@ -1228,7 +1228,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
1228
1228
  return false;
1229
1229
  }
1230
1230
  function getEngineVersion() {
1231
- return "3.3.9";
1231
+ return "3.3.10";
1232
1232
  }
1233
1233
  function getStandardsVersion() {
1234
1234
  try {
@@ -1958,7 +1958,12 @@ function resolveNationalLawReference(country, sector, lang = "en") {
1958
1958
  }
1959
1959
  }
1960
1960
  const law = (0, import_standards.getNationalLawForSector)(country, sector);
1961
- if (law) return `${law.fullName} (${law.law})`;
1961
+ if (law) {
1962
+ const shortName = law.law.trim();
1963
+ const longName = law.fullName.trim();
1964
+ const redundant = longName === shortName || longName.startsWith(shortName);
1965
+ return redundant ? longName : `${longName} (${shortName})`;
1966
+ }
1962
1967
  const langKey = lang.split("-")[0];
1963
1968
  return NATIONAL_LAW_FALLBACK[langKey] ?? NATIONAL_LAW_FALLBACK.en;
1964
1969
  }
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  resolveNationalLawReference,
18
18
  selectMappedRuleId,
19
19
  wcagTagToCriterion
20
- } from "./chunk-JRUQBEGG.mjs";
20
+ } from "./chunk-ROGZGHH6.mjs";
21
21
  import {
22
22
  getCurrentLang,
23
23
  setLanguage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holmdigital/engine",
3
- "version": "3.3.9",
3
+ "version": "3.3.10",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -85,8 +85,8 @@
85
85
  "node": ">=22.22.0"
86
86
  },
87
87
  "dependencies": {
88
- "@holmdigital/components": "^4.0.1",
89
- "@holmdigital/standards": "^4.1.0",
88
+ "@holmdigital/components": "^4.0.2",
89
+ "@holmdigital/standards": "^4.1.1",
90
90
  "axe-core": "^4.13.0",
91
91
  "chalk": "^6.0.0",
92
92
  "commander": "^15.0.0",