Commits (3)
......@@ -42,9 +42,8 @@ pages:
artifacts:
paths:
- public
only:
- tags
- triggers
rules:
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/'
script:
- npm run --if-present build
- npm run build:docs
......@@ -135,15 +134,29 @@ Jest compat:
script:
- npm exec jest -- --no-coverage matchers tests/jest
Release:
.release:
stage: release
only:
- web
variables:
GIT_AUTHOR_NAME: ${GITLAB_USER_NAME}
GIT_AUTHOR_EMAIL: ${GITLAB_USER_EMAIL}
GIT_COMMITTER_NAME: ${HTML_VALIDATE_BOT_NAME}
GIT_COMMITTER_EMAIL: ${HTML_VALIDATE_BOT_EMAIL}
Dry run:
extends: .release
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
- if: '$CI_COMMIT_REF_NAME =~ /^release\//'
script:
- npm exec semantic-release -- --dry-run
Release:
extends: .release
rules:
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "web"'
when: manual
- if: '$CI_COMMIT_REF_NAME =~ /^release\// && $CI_PIPELINE_SOURCE == "web"'
when: manual
script:
- npm exec semantic-release
......
# html-validate changelog
### [4.14.1](https://gitlab.com/html-validate/html-validate/compare/v4.14.0...v4.14.1) (2021-09-18)
### Bug Fixes
- **jest:** handle when `jest-diff` default import is object ([74f9b84](https://gitlab.com/html-validate/html-validate/commit/74f9b8424e0bf5071823e82bfc79d8904025808a))
## [4.14.0](https://gitlab.com/html-validate/html-validate/compare/v4.13.1...v4.14.0) (2021-06-14)
### Features
......
This diff is collapsed.
{
"name": "html-validate",
"version": "4.14.0",
"version": "4.14.1",
"description": "html linter",
"keywords": [
"html",
......@@ -142,7 +142,7 @@
"@html-validate/eslint-config-typescript": "4.4.0",
"@html-validate/jest-config": "1.2.10",
"@html-validate/prettier-config": "1.1.0",
"@html-validate/semantic-release-config": "1.2.15",
"@html-validate/semantic-release-config": "2.1.2",
"@lodder/grunt-postcss": "3.0.1",
"@types/babar": "0.2.0",
"@types/babel__code-frame": "7.0.2",
......
......@@ -13,9 +13,23 @@ interface TokenMatcher {
data?: any;
}
/* ignore typing for compatibility so it will seem "impossible" but different version will yield different source */
const diffCandidates: Array<typeof jestDiff.diff> = [
// @ts-ignore
jestDiffDefault?.diff,
// @ts-ignore
jestDiffDefault,
// @ts-ignore
jestDiff?.diff,
// @ts-ignore
jestDiff,
];
const isFunction = (fn: unknown): boolean => typeof fn === "function";
/* istanbul ignore next: covered by compatibility tests but not a single pass */
/* @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;
/* @ts-ignore assume one of the candidate matches, there will be a reasonable error later on if not */
const diff: typeof jestDiff.diff = diffCandidates.find(isFunction);
declare global {
namespace jest {
......