@markuplint/pug-parser 4.6.4 → 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,16 +3,23 @@
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.4](https://github.com/markuplint/markuplint/compare/@markuplint/pug-parser@4.6.3...@markuplint/pug-parser@4.6.4) (2024-06-09)
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
+ **Note:** Version bump only for package @markuplint/pug-parser
8
9
 
9
- ### Bug Fixes
10
10
 
11
- * fix to export type files ([eff4bbf](https://github.com/markuplint/markuplint/commit/eff4bbfd127574809dc5e15d7cafe87699758ee0))
12
11
 
13
12
 
14
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
+
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)
19
+
20
+ ### Bug Fixes
15
21
 
22
+ - fix to export type files ([eff4bbf](https://github.com/markuplint/markuplint/commit/eff4bbfd127574809dc5e15d7cafe87699758ee0))
16
23
 
17
24
  ## [4.6.3](https://github.com/markuplint/markuplint/compare/@markuplint/pug-parser@4.6.2...@markuplint/pug-parser@4.6.3) (2024-05-28)
18
25
 
@@ -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.4",
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.4",
25
- "@markuplint/ml-ast": "4.4.1",
26
- "@markuplint/parser-utils": "4.6.4",
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": "0200dc1f7b1ffa7455b889696153e25dbae8241f"
30
+ "gitHead": "77cd5a25d5cf28c83253b7bfe02cd25b54e236b0"
31
31
  }