@holmdigital/standards 1.2.1 → 1.2.3

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.
package/dist/index.js CHANGED
@@ -17950,6 +17950,10 @@ var ict_manual_checks_default = [
17950
17950
 
17951
17951
  // src/index.ts
17952
17952
  function getData(lang = "en") {
17953
+ const supportedLangs = ["sv", "de", "fr", "es", "nl", "en-gb", "en-us", "en-ca", "en"];
17954
+ if (!supportedLangs.includes(lang.toLowerCase())) {
17955
+ console.warn(`[standards] Language '${lang}' not supported, falling back to 'en'. Supported: ${supportedLangs.join(", ")}`);
17956
+ }
17953
17957
  switch (lang.toLowerCase()) {
17954
17958
  case "sv":
17955
17959
  return rules_sv_default;
package/dist/index.mjs CHANGED
@@ -17909,6 +17909,10 @@ var ict_manual_checks_default = [
17909
17909
 
17910
17910
  // src/index.ts
17911
17911
  function getData(lang = "en") {
17912
+ const supportedLangs = ["sv", "de", "fr", "es", "nl", "en-gb", "en-us", "en-ca", "en"];
17913
+ if (!supportedLangs.includes(lang.toLowerCase())) {
17914
+ console.warn(`[standards] Language '${lang}' not supported, falling back to 'en'. Supported: ${supportedLangs.join(", ")}`);
17915
+ }
17912
17916
  switch (lang.toLowerCase()) {
17913
17917
  case "sv":
17914
17918
  return rules_sv_default;
package/package.json CHANGED
@@ -1,70 +1,71 @@
1
- {
2
- "name": "@holmdigital/standards",
3
- "version": "1.2.1",
4
- "private": false,
5
- "publishConfig": {
6
- "access": "public",
7
- "registry": "https://registry.npmjs.org/"
8
- },
9
- "description": "Machine-readable regulatory database for WCAG, EN 301 549 and the DOS Act",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/holmdigital/a11y-hd.git",
13
- "directory": "packages/standards"
14
- },
15
- "main": "./dist/index.js",
16
- "module": "./dist/index.mjs",
17
- "types": "./dist/index.d.ts",
18
- "exports": {
19
- ".": {
20
- "types": "./dist/index.d.ts",
21
- "import": "./dist/index.mjs",
22
- "require": "./dist/index.js"
23
- },
24
- "./data/*": "./data/*",
25
- "./schema/*": "./schema/*"
26
- },
27
- "files": [
28
- "dist",
29
- "data",
30
- "schema",
31
- "README.md"
32
- ],
33
- "scripts": {
34
- "build": "tsup src/index.ts --format cjs,esm --dts --clean",
35
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
36
- "test": "vitest",
37
- "lint": "eslint src --ext .ts",
38
- "validate-schema": "node scripts/validate-schema.js",
39
- "validate-data": "node scripts/validate-data.js"
40
- },
41
- "keywords": [
42
- "accessibility",
43
- "a11y",
44
- "wcag",
45
- "en301549",
46
- "dos-lagen",
47
- "standards",
48
- "regulatory",
49
- "compliance",
50
- "legislation",
51
- "regulation",
52
- "section508",
53
- "ada",
54
- "aoda",
55
- "bitv",
56
- "rgaa",
57
- "digitoegankelijk"
58
- ],
59
- "author": "Holm Digital AB",
60
- "license": "MIT",
61
- "dependencies": {
62
- "ajv": "^8.17.1"
63
- },
64
- "devDependencies": {
65
- "@types/node": "^22.10.2",
66
- "tsup": "^8.3.5",
67
- "typescript": "^5.7.2",
68
- "vitest": "^2.1.8"
69
- }
1
+ {
2
+ "name": "@holmdigital/standards",
3
+ "version": "1.2.3",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "access": "public",
7
+ "registry": "https://registry.npmjs.org/"
8
+ },
9
+ "description": "Machine-readable regulatory database for WCAG, EN 301 549 and the DOS Act",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/holmdigital/a11y-hd.git",
13
+ "directory": "packages/standards"
14
+ },
15
+ "main": "./dist/index.js",
16
+ "module": "./dist/index.mjs",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.mjs",
22
+ "require": "./dist/index.js"
23
+ },
24
+ "./data/*": "./data/*",
25
+ "./schema/*": "./schema/*"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "data",
30
+ "schema",
31
+ "README.md"
32
+ ],
33
+ "scripts": {
34
+ "build": "tsup src/index.ts --format cjs,esm --dts --clean",
35
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
36
+ "test": "vitest",
37
+ "test:ci": "vitest run",
38
+ "lint": "eslint src",
39
+ "validate-schema": "node scripts/validate-schema.js",
40
+ "validate-data": "node scripts/validate-data.js"
41
+ },
42
+ "keywords": [
43
+ "accessibility",
44
+ "a11y",
45
+ "wcag",
46
+ "en301549",
47
+ "dos-lagen",
48
+ "standards",
49
+ "regulatory",
50
+ "compliance",
51
+ "legislation",
52
+ "regulation",
53
+ "section508",
54
+ "ada",
55
+ "aoda",
56
+ "bitv",
57
+ "rgaa",
58
+ "digitoegankelijk"
59
+ ],
60
+ "author": "Holm Digital AB",
61
+ "license": "MIT",
62
+ "dependencies": {
63
+ "ajv": "^8.17.1"
64
+ },
65
+ "devDependencies": {
66
+ "@types/node": "^22.10.2",
67
+ "tsup": "^8.3.5",
68
+ "typescript": "^5.7.2",
69
+ "vitest": "^4.0.16"
70
+ }
70
71
  }