Commits (2)
# html-validate changelog
### [4.13.1](https://gitlab.com/html-validate/html-validate/compare/v4.13.0...v4.13.1) (2021-05-28)
### Bug Fixes
- **jest:** fix `TypeError: diff is not a function` ([2afc2e8](https://gitlab.com/html-validate/html-validate/commit/2afc2e8796d9e2a8b9b79af91625f6d844860a53))
## [4.13.0](https://gitlab.com/html-validate/html-validate/compare/v4.12.0...v4.13.0) (2021-05-28)
### Features
......
{
"name": "html-validate",
"version": "4.13.0",
"version": "4.13.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "4.13.0",
"version": "4.13.1",
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.10.0",
{
"name": "html-validate",
"version": "4.13.0",
"version": "4.13.1",
"description": "html linter",
"keywords": [
"html",
......
/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/ban-ts-comment, prefer-template, sonarjs/no-duplicate-string */
import * as jestDiff from "jest-diff";
import jestDiffDefault, * as jestDiff from "jest-diff";
import deepmerge from "deepmerge";
import { TokenType } from "./lexer";
import { Message, Report, Result } from "./reporter";
......@@ -14,7 +14,8 @@ interface TokenMatcher {
}
/* istanbul ignore next: covered by compatibility tests but not a single pass */
const diff = jestDiff?.diff ?? jestDiff;
/* @ts-ignore typing for compatibility so it will seem "impossible" but different version will yield different source */
const diff: typeof jestDiff.diff = jestDiffDefault ?? jestDiff?.diff ?? jestDiff;
declare global {
namespace jest {
......