From 28ee7848962ecfd2664fc87ca11b4bef170a3f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3n=20Molleda?= Date: Thu, 10 Oct 2019 13:23:49 -0700 Subject: [PATCH] Chore: Use new `utils-compat-data` package --- packages/hint-compat-api/package.json | 4 ++-- packages/hint-compat-api/src/css.ts | 3 +-- packages/hint-compat-api/src/html.ts | 2 +- packages/hint-compat-api/src/utils/alternatives.ts | 2 +- packages/hint-compat-api/src/utils/browsers.ts | 3 +-- packages/hint-compat-api/src/utils/filter-supports.ts | 2 +- packages/hint-disown-opener/package.json | 3 ++- packages/hint-disown-opener/src/hint.ts | 2 +- packages/hint-manifest-is-valid/package.json | 1 + packages/hint-manifest-is-valid/src/hint.ts | 2 +- packages/hint-meta-theme-color/package.json | 1 + packages/hint-meta-theme-color/src/hint.ts | 3 ++- 12 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/hint-compat-api/package.json b/packages/hint-compat-api/package.json index e04075d8df1..5ef5397cdc6 100644 --- a/packages/hint-compat-api/package.json +++ b/packages/hint-compat-api/package.json @@ -7,12 +7,12 @@ "timeout": "1m" }, "dependencies": { - "@hint/utils": "^5.0.2" + "@hint/utils": "^5.0.2", + "@hint/utils-compat-data": "^1.0.0" }, "description": "hint to validate if the HTML, CSS, and JavaScript APIs of the project are deprecated or not broadly supported", "devDependencies": { "@hint/parser-css": "^3.0.12", - "@hint/utils": "^5.0.2", "@hint/utils-tests-helpers": "^5.0.10", "@types/debug": "^4.1.5", "@types/node": "^12.7.5", diff --git a/packages/hint-compat-api/src/css.ts b/packages/hint-compat-api/src/css.ts index 514f5113c94..54d6d4e3164 100644 --- a/packages/hint-compat-api/src/css.ts +++ b/packages/hint-compat-api/src/css.ts @@ -8,8 +8,7 @@ import { vendor, AtRule, Rule, Declaration, ChildNode, ContainerBase } from 'pos import { HintContext } from 'hint/dist/src/lib/hint-context'; import { IHint, ProblemLocation } from 'hint/dist/src/lib/types'; import { StyleEvents } from '@hint/parser-css/dist/src/types'; -import { getUnsupportedDetails } from '@hint/utils/dist/src/compat'; -import { UnsupportedBrowsers } from '@hint/utils/dist/src/compat/browsers'; +import { getUnsupportedDetails, UnsupportedBrowsers } from '@hint/utils-compat-data'; import { getCSSCodeSnippet } from '@hint/utils/dist/src/report'; import { formatAlternatives } from './utils/alternatives'; diff --git a/packages/hint-compat-api/src/html.ts b/packages/hint-compat-api/src/html.ts index fe463a6633c..20844207ecf 100644 --- a/packages/hint-compat-api/src/html.ts +++ b/packages/hint-compat-api/src/html.ts @@ -5,7 +5,7 @@ import { HintContext } from 'hint/dist/src/lib/hint-context'; import { IHint } from 'hint/dist/src/lib/types'; import { HTMLAttribute, HTMLElement } from '@hint/utils'; -import { getUnsupportedDetails, UnsupportedBrowsers } from '@hint/utils/dist/src/compat'; +import { getUnsupportedDetails, UnsupportedBrowsers } from '@hint/utils-compat-data'; import { filterBrowsers, joinBrowsers } from './utils/browsers'; import { resolveIgnore } from './utils/ignore'; diff --git a/packages/hint-compat-api/src/utils/alternatives.ts b/packages/hint-compat-api/src/utils/alternatives.ts index 403ace85577..26e737e2157 100644 --- a/packages/hint-compat-api/src/utils/alternatives.ts +++ b/packages/hint-compat-api/src/utils/alternatives.ts @@ -1,4 +1,4 @@ -import { AlternativeDetails, UnsupportedBrowsers } from '@hint/utils/dist/src/compat/browsers'; +import { AlternativeDetails, UnsupportedBrowsers } from '@hint/utils-compat-data'; import { getMessage } from '../i18n.import'; diff --git a/packages/hint-compat-api/src/utils/browsers.ts b/packages/hint-compat-api/src/utils/browsers.ts index d7c09a54101..4e93bfb2c6a 100644 --- a/packages/hint-compat-api/src/utils/browsers.ts +++ b/packages/hint-compat-api/src/utils/browsers.ts @@ -1,5 +1,4 @@ -import { UnsupportedBrowsers } from '@hint/utils/dist/src/compat'; -import { getFriendlyName } from '@hint/utils/dist/src/compat/browsers'; +import { getFriendlyName, UnsupportedBrowsers } from '@hint/utils-compat-data'; /** * Apply temporary filters to the list of target browsers to reduce diff --git a/packages/hint-compat-api/src/utils/filter-supports.ts b/packages/hint-compat-api/src/utils/filter-supports.ts index 19206804aea..a8d1aa67268 100644 --- a/packages/hint-compat-api/src/utils/filter-supports.ts +++ b/packages/hint-compat-api/src/utils/filter-supports.ts @@ -2,7 +2,7 @@ import difference = require('lodash/difference'); import intersection = require('lodash/intersection'); import union = require('lodash/union'); -import { getSupported } from '@hint/utils/dist/src/compat/support'; +import { getSupported } from '@hint/utils-compat-data'; import { parseSupports, Declaration, DeclarationGroup } from './parse-supports'; diff --git a/packages/hint-disown-opener/package.json b/packages/hint-disown-opener/package.json index 8929de42eda..b4c5c9d950b 100644 --- a/packages/hint-disown-opener/package.json +++ b/packages/hint-disown-opener/package.json @@ -7,7 +7,8 @@ "timeout": "1m" }, "dependencies": { - "@hint/utils": "^5.0.2" + "@hint/utils": "^5.0.2", + "@hint/utils-compat-data": "^1.0.0" }, "description": "hint that that checks if external links disown the opener", "devDependencies": { diff --git a/packages/hint-disown-opener/src/hint.ts b/packages/hint-disown-opener/src/hint.ts index fd2aafc5412..d30eab755d9 100644 --- a/packages/hint-disown-opener/src/hint.ts +++ b/packages/hint-disown-opener/src/hint.ts @@ -13,7 +13,7 @@ import { URL } from 'url'; import { debug as d } from '@hint/utils/dist/src/debug'; -import { isSupported } from '@hint/utils/dist/src/compat'; +import { isSupported } from '@hint/utils-compat-data'; import { isRegularProtocol } from '@hint/utils/dist/src/network/is-regular-protocol'; import { HTMLElement } from '@hint/utils/dist/src/dom/html'; import { cutString } from '@hint/utils/dist/src/misc/cut-string'; diff --git a/packages/hint-manifest-is-valid/package.json b/packages/hint-manifest-is-valid/package.json index 33290dbe999..781445622de 100644 --- a/packages/hint-manifest-is-valid/package.json +++ b/packages/hint-manifest-is-valid/package.json @@ -8,6 +8,7 @@ }, "dependencies": { "@hint/utils": "^5.0.2", + "@hint/utils-compat-data": "^1.0.0", "bcp47": "^1.1.2", "color-string": "^1.5.3" }, diff --git a/packages/hint-manifest-is-valid/src/hint.ts b/packages/hint-manifest-is-valid/src/hint.ts index 9fd64aa99a0..cfbe64a59f0 100644 --- a/packages/hint-manifest-is-valid/src/hint.ts +++ b/packages/hint-manifest-is-valid/src/hint.ts @@ -15,7 +15,7 @@ import { IHint, IJSONLocationFunction } from 'hint/dist/src/lib/types'; -import { isSupported } from '@hint/utils/dist/src/compat'; +import { isSupported } from '@hint/utils-compat-data'; import { normalizeString } from '@hint/utils/dist/src/misc/normalize-string'; import { Manifest, diff --git a/packages/hint-meta-theme-color/package.json b/packages/hint-meta-theme-color/package.json index 786bea630cc..299f52d9d74 100644 --- a/packages/hint-meta-theme-color/package.json +++ b/packages/hint-meta-theme-color/package.json @@ -8,6 +8,7 @@ }, "dependencies": { "@hint/utils": "^5.0.2", + "@hint/utils-compat-data": "^1.0.0", "color-string": "^1.5.3" }, "description": "hint for best practices related to the 'theme-color' meta tag", diff --git a/packages/hint-meta-theme-color/src/hint.ts b/packages/hint-meta-theme-color/src/hint.ts index dd4299949de..7989ce46a81 100644 --- a/packages/hint-meta-theme-color/src/hint.ts +++ b/packages/hint-meta-theme-color/src/hint.ts @@ -17,7 +17,8 @@ import { IHint, TraverseEnd } from 'hint'; -import { HTMLElement, isSupported, misc } from '@hint/utils'; +import { HTMLElement, misc } from '@hint/utils'; +import { isSupported } from '@hint/utils-compat-data'; import meta from './meta'; import { getMessage } from './i18n.import';