all-named-html-entities 3.1.3 → 3.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "all-named-html-entities",
3
- "version": "3.1.3",
3
+ "version": "3.2.0",
4
4
  "description": "List of all named HTML entities",
5
5
  "keywords": [
6
6
  "all",
@@ -34,41 +34,40 @@
34
34
  },
35
35
  "types": "types/index.d.ts",
36
36
  "scripts": {
37
- "build": "node '../../ops/scripts/esbuild.js' && npm run dts",
38
- "cjs-off": "exit 0",
39
- "cjs-on": "exit 0",
40
- "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
37
+ "build": "node ../../ops/scripts/esbuild.js && npm run dts",
38
+ "coverage": "c8 uvu test",
39
+ "dev": "node ../../ops/scripts/esbuild.js --dev && npm run dts",
41
40
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
42
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
41
+ "dts": "rollup -c && biome format --write --config-path=../../biome.json --vcs-enabled=false --use-editorconfig=false types/index.d.ts",
43
42
  "examples": "node '../../ops/scripts/run-examples.js'",
44
- "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
45
- "letspublish": "npm publish --provenance || :",
46
- "lint": "eslint . --fix --concurrency=auto --cache",
43
+ "lect": "node '../../ops/lect/lect.js'",
44
+ "lect:check": "node '../../ops/lect/lect.js' --check",
45
+ "lint": "biome lint --error-on-warnings . && npm run typecheck",
46
+ "lint:fix": "biome lint --write --error-on-warnings . && npm run typecheck",
47
47
  "perf": "node perf/check.js",
48
48
  "prep": "echo 'ready'",
49
- "prettier": "prettier",
50
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
51
- "pretest": "npm run lect && npm run build",
49
+ "prettier": "biome format",
50
+ "prettier:format": "biome format --write .",
51
+ "pretest": "npm run lect:check && npm run build",
52
52
  "test": "npm run devtest",
53
+ "typecheck": "tsc --noEmit --pretty false --project tsconfig.json",
53
54
  "unit": "uvu test"
54
55
  },
55
- "engines": {
56
- "node": ">=14.18.0"
57
- },
58
56
  "c8": {
57
+ "all": true,
59
58
  "check-coverage": true,
60
- "exclude": [
61
- "**/test/**/*.*"
62
- ],
59
+ "exclude": ["**/test/**/*.*"],
60
+ "include": ["dist/*.esm.js"],
63
61
  "lines": 100
64
62
  },
65
63
  "lect": {
66
64
  "licence": {
67
- "extras": [
68
- ""
69
- ]
65
+ "extras": [""]
70
66
  }
71
67
  },
68
+ "engines": {
69
+ "node": ">=18.20.8"
70
+ },
72
71
  "publishConfig": {
73
72
  "registry": "https://registry.npmjs.org/"
74
73
  }
package/types/index.d.ts CHANGED
@@ -1,16 +1,20 @@
1
- type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
2
- type JsonObject = {
3
- [Key in string]?: JsonValue;
4
- };
5
- type JsonArray = JsonValue[];
1
+ type EntityLookup = Record<string, string>;
2
+ type EntityAffixLookup = Record<string, Record<string, string[]>>;
3
+ type UncertainEntityLookup = Record<
4
+ string,
5
+ {
6
+ addAmpIfSemiPresent: boolean | string;
7
+ addSemiIfAmpPresent: boolean | string;
8
+ }
9
+ >;
6
10
  declare const version: string;
7
- declare const allNamedEntities: JsonObject;
8
- declare const brokenNamedEntities: JsonObject;
9
- declare const entStartsWith: JsonObject;
10
- declare const entEndsWith: JsonObject;
11
- declare const entStartsWithCaseInsensitive: JsonObject;
12
- declare const entEndsWithCaseInsensitive: JsonObject;
13
- declare const uncertain: JsonObject;
11
+ declare const allNamedEntities: EntityLookup;
12
+ declare const brokenNamedEntities: EntityLookup;
13
+ declare const entStartsWith: EntityAffixLookup;
14
+ declare const entEndsWith: EntityAffixLookup;
15
+ declare const entStartsWithCaseInsensitive: EntityAffixLookup;
16
+ declare const entEndsWithCaseInsensitive: EntityAffixLookup;
17
+ declare const uncertain: UncertainEntityLookup;
14
18
  declare const allNamedEntitiesSetOnly: Set<string>;
15
19
  declare const allNamedEntitiesSetOnlyCaseInsensitive: Set<string>;
16
20
  declare function decode(ent: string): string | null;