htmljs-parser 5.1.1 → 5.1.2

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.
@@ -1,9 +1,9 @@
1
1
  import { StateDefinition, Meta } from "../internal";
2
2
  export interface ExpressionMeta extends Meta {
3
3
  groupStack: number[];
4
- terminator: number | (number | number[])[];
5
- skipOperators: boolean;
4
+ operators: boolean;
6
5
  terminatedByEOL: boolean;
7
6
  terminatedByWhitespace: boolean;
7
+ shouldTerminate(code: number, data: string, pos: number): boolean;
8
8
  }
9
9
  export declare const EXPRESSION: StateDefinition<ExpressionMeta>;
@@ -1,5 +1,5 @@
1
1
  import { StateDefinition, Ranges, Meta, TagType } from "../internal";
2
- export declare const enum TAG_STAGE {
2
+ export declare enum TAG_STAGE {
3
3
  UNKNOWN = 0,
4
4
  VAR = 1,
5
5
  ARGUMENT = 2,
@@ -27,6 +27,7 @@ export declare const enum CODE {
27
27
  DOLLAR = 36,
28
28
  PERCENT = 37,
29
29
  PERIOD = 46,
30
+ PLUS = 43,
30
31
  COMMA = 44,
31
32
  COLON = 58,
32
33
  SEMICOLON = 59,
@@ -35,7 +36,11 @@ export declare const enum CODE {
35
36
  NEWLINE = 10,
36
37
  CARRIAGE_RETURN = 13,
37
38
  SPACE = 32,
38
- TAB = 9
39
+ TAB = 9,
40
+ AMPERSAND = 38,
41
+ CARET = 94,
42
+ TILDE = 126,
43
+ UNDERSCORE = 95
39
44
  }
40
45
  export interface Position {
41
46
  /**
@@ -15,3 +15,6 @@ export declare function getPosition(lines: number[], offset: number): Position;
15
15
  */
16
16
  export declare function getLines(src: string): number[];
17
17
  export declare function htmlEOF(this: Parser): void;
18
+ export declare function matchesCloseParen(code: number): boolean;
19
+ export declare function matchesCloseCurlyBrace(code: number): boolean;
20
+ export declare function matchesPipe(code: number): boolean;
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "htmljs-parser",
3
3
  "description": "An HTML parser recognizes content and string placeholders and allows JavaScript expressions as attribute values",
4
- "version": "5.1.1",
4
+ "version": "5.1.2",
5
5
  "devDependencies": {
6
- "@changesets/changelog-github": "^0.4.4",
7
- "@changesets/cli": "^2.22.0",
6
+ "@changesets/changelog-github": "^0.4.6",
7
+ "@changesets/cli": "^2.24.1",
8
8
  "@types/degit": "^2.8.3",
9
9
  "@types/mocha": "^9.1.1",
10
- "@types/node": "^17.0.38",
11
- "@typescript-eslint/eslint-plugin": "^5.27.0",
12
- "@typescript-eslint/parser": "^5.27.0",
10
+ "@types/node": "^18.6.4",
11
+ "@typescript-eslint/eslint-plugin": "^5.32.0",
12
+ "@typescript-eslint/parser": "^5.32.0",
13
13
  "cross-env": "^7.0.3",
14
14
  "degit": "^2.8.4",
15
- "esbuild": "0.14.42",
16
- "eslint": "^8.16.0",
15
+ "esbuild": "0.14.53",
16
+ "eslint": "^8.21.0",
17
17
  "eslint-config-prettier": "^8.5.0",
18
18
  "fast-glob": "^3.2.11",
19
19
  "fixpack": "^4.0.0",
20
20
  "husky": "^8.0.1",
21
- "lint-staged": "^13.0.0",
22
- "mitata": "^0.1.1",
21
+ "lint-staged": "^13.0.3",
22
+ "mitata": "^0.1.6",
23
23
  "mocha": "^10.0.0",
24
24
  "mocha-snap": "^4.3.0",
25
25
  "nyc": "^15.1.0",
26
- "prettier": "^2.6.2",
27
- "tsx": "^3.4.2",
28
- "typescript": "^4.7.2"
26
+ "prettier": "^2.7.1",
27
+ "tsx": "^3.8.0",
28
+ "typescript": "^4.7.4"
29
29
  },
30
30
  "exports": {
31
31
  ".": {