@markuplint/pug-parser 4.6.5 → 4.6.6

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/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [4.6.5](https://github.com/markuplint/markuplint/compare/@markuplint/pug-parser@4.6.4...@markuplint/pug-parser@4.6.5) (2024-06-25)
6
+ ## [4.6.6](https://github.com/markuplint/markuplint/compare/@markuplint/pug-parser@4.6.5...@markuplint/pug-parser@4.6.6) (2024-09-02)
7
7
 
8
8
  **Note:** Version bump only for package @markuplint/pug-parser
9
9
 
@@ -11,6 +11,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
+ ## [4.6.5](https://github.com/markuplint/markuplint/compare/@markuplint/pug-parser@4.6.4...@markuplint/pug-parser@4.6.5) (2024-06-25)
15
+
16
+ **Note:** Version bump only for package @markuplint/pug-parser
17
+
14
18
  ## [4.6.4](https://github.com/markuplint/markuplint/compare/@markuplint/pug-parser@4.6.3...@markuplint/pug-parser@4.6.4) (2024-06-09)
15
19
 
16
20
  ### Bug Fixes
@@ -17,7 +17,7 @@ export function pugParse(pug, useOffset = false) {
17
17
  }
18
18
  lexOrigin = newLexOrigin;
19
19
  }
20
- const lex = JSON.parse(JSON.stringify(lexOrigin));
20
+ const lex = structuredClone(lexOrigin);
21
21
  const originAst = parser(lexOrigin);
22
22
  const ast = optimizeAST(originAst, lex, pug);
23
23
  return ast;
@@ -433,7 +433,7 @@ tokens, pug, offsets, depth) {
433
433
  function getLocationFromToken(offset, line, column,
434
434
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
435
435
  tokens, tokenType) {
436
- const tokenTypes = typeof tokenType === 'string' ? (tokenType === '' ? null : [tokenType]) : tokenType ?? null;
436
+ const tokenTypes = typeof tokenType === 'string' ? (tokenType === '' ? null : [tokenType]) : (tokenType ?? null);
437
437
  let tokenOfCurrentNode = null;
438
438
  for (const token of tokens) {
439
439
  if ((tokenTypes == null || tokenTypes.includes(token.type)) &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/pug-parser",
3
- "version": "4.6.5",
3
+ "version": "4.6.6",
4
4
  "description": "Pug parser for markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -21,11 +21,11 @@
21
21
  "clean": "tsc --build --clean"
22
22
  },
23
23
  "dependencies": {
24
- "@markuplint/html-parser": "4.6.5",
25
- "@markuplint/ml-ast": "4.4.2",
26
- "@markuplint/parser-utils": "4.6.5",
24
+ "@markuplint/html-parser": "4.6.6",
25
+ "@markuplint/ml-ast": "4.4.3",
26
+ "@markuplint/parser-utils": "4.6.6",
27
27
  "pug-lexer": "5.0.1",
28
28
  "pug-parser": "6.0.0"
29
29
  },
30
- "gitHead": "05fdca254661ec335ff0cae4c6a11db164b032b9"
30
+ "gitHead": "77cd5a25d5cf28c83253b7bfe02cd25b54e236b0"
31
31
  }