Skip to content
Permalink
Browse files

Chore: Update packages to use @hint/utils-dom

  • Loading branch information
sarvaje committed Oct 28, 2019
1 parent 411182d commit d95dc4a3711aa1a2cda74a7f83d14a49a4c92d65
Showing with 135 additions and 75 deletions.
  1. +1 βˆ’0 packages/connector-jsdom/package.json
  2. +2 βˆ’5 packages/connector-jsdom/src/connector.ts
  3. +2 βˆ’3 packages/connector-jsdom/src/resource-loader.ts
  4. +2 βˆ’1 packages/connector-jsdom/tsconfig.json
  5. +1 βˆ’0 packages/connector-local/package.json
  6. +7 βˆ’4 packages/connector-local/src/connector.ts
  7. +1 βˆ’0 packages/connector-local/tsconfig.json
  8. +1 βˆ’0 packages/connector-puppeteer/package.json
  9. +6 βˆ’4 packages/connector-puppeteer/src/connector.ts
  10. +2 βˆ’1 packages/connector-puppeteer/src/lib/create-fetchend-payload.ts
  11. +2 βˆ’1 packages/connector-puppeteer/src/lib/events.ts
  12. +1 βˆ’1 packages/connector-puppeteer/src/lib/get-element-from-response.ts
  13. +1 βˆ’1 packages/connector-puppeteer/src/lib/get-favicon.ts
  14. +2 βˆ’1 packages/connector-puppeteer/tsconfig.json
  15. +1 βˆ’0 packages/extension-browser/package.json
  16. +9 βˆ’3 packages/extension-browser/src/content-script/connector.ts
  17. +1 βˆ’0 packages/extension-browser/tsconfig.json
  18. +1 βˆ’0 packages/hint-apple-touch-icons/package.json
  19. +2 βˆ’1 packages/hint-apple-touch-icons/src/hint.ts
  20. +1 βˆ’0 packages/hint-apple-touch-icons/tsconfig.json
  21. +1 βˆ’0 packages/hint-axe/package.json
  22. +2 βˆ’1 packages/hint-axe/src/util/axe.ts
  23. +1 βˆ’0 packages/hint-axe/tsconfig.json
  24. +1 βˆ’0 packages/hint-compat-api/package.json
  25. +2 βˆ’1 packages/hint-compat-api/src/html.ts
  26. +1 βˆ’0 packages/hint-compat-api/tsconfig.json
  27. +1 βˆ’0 packages/hint-disown-opener/package.json
  28. +1 βˆ’1 packages/hint-disown-opener/src/hint.ts
  29. +1 βˆ’0 packages/hint-disown-opener/tsconfig.json
  30. +1 βˆ’0 packages/hint-highest-available-document-mode/package.json
  31. +2 βˆ’1 packages/hint-highest-available-document-mode/src/hint.ts
  32. +1 βˆ’0 packages/hint-highest-available-document-mode/tsconfig.json
  33. +1 βˆ’0 packages/hint-http-compression/package.json
  34. +1 βˆ’1 packages/hint-http-compression/src/hint.ts
  35. +1 βˆ’0 packages/hint-http-compression/tsconfig.json
  36. +1 βˆ’0 packages/hint-image-optimization-cloudinary/package.json
  37. +1 βˆ’1 packages/hint-image-optimization-cloudinary/src/cloudinary-types.ts
  38. +1 βˆ’0 packages/hint-image-optimization-cloudinary/tsconfig.json
  39. +1 βˆ’0 packages/hint-meta-theme-color/package.json
  40. +2 βˆ’1 packages/hint-meta-theme-color/src/hint.ts
  41. +1 βˆ’0 packages/hint-meta-theme-color/tsconfig.json
  42. +1 βˆ’0 packages/hint-meta-viewport/package.json
  43. +2 βˆ’1 packages/hint-meta-viewport/src/hint.ts
  44. +1 βˆ’0 packages/hint-meta-viewport/tsconfig.json
  45. +1 βˆ’0 packages/hint-no-broken-links/package.json
  46. +2 βˆ’1 packages/hint-no-broken-links/src/hint.ts
  47. +1 βˆ’0 packages/hint-no-broken-links/tsconfig.json
  48. +1 βˆ’0 packages/hint-scoped-svg-styles/package.json
  49. +1 βˆ’1 packages/hint-scoped-svg-styles/src/hint.ts
  50. +1 βˆ’0 packages/hint-scoped-svg-styles/tsconfig.json
  51. +1 βˆ’0 packages/hint/package.json
  52. +2 βˆ’1 packages/hint/src/lib/engine.ts
  53. +5 βˆ’5 packages/hint/src/lib/hint-context.ts
  54. +2 βˆ’1 packages/hint/src/lib/types/connector.ts
  55. +1 βˆ’1 packages/hint/src/lib/types/element-events.ts
  56. +2 βˆ’1 packages/hint/src/lib/types/events.ts
  57. +1 βˆ’0 packages/hint/tsconfig.json
  58. +4 βˆ’3 packages/parser-css/package.json
  59. +1 βˆ’1 packages/parser-css/src/parser.ts
  60. +1 βˆ’1 packages/parser-css/src/types.ts
  61. +1 βˆ’1 packages/parser-css/tests/helpers/mocks.ts
  62. +2 βˆ’1 packages/parser-css/tsconfig.json
  63. +1 βˆ’1 packages/parser-html/package.json
  64. +1 βˆ’1 packages/parser-html/src/parser.ts
  65. +1 βˆ’1 packages/parser-html/src/types.ts
  66. +1 βˆ’1 packages/parser-html/tsconfig.json
  67. +4 βˆ’3 packages/parser-javascript/package.json
  68. +1 βˆ’1 packages/parser-javascript/src/parser.ts
  69. +1 βˆ’1 packages/parser-javascript/src/types.ts
  70. +1 βˆ’1 packages/parser-javascript/tests/tests.ts
  71. +2 βˆ’1 packages/parser-javascript/tsconfig.json
  72. +1 βˆ’1 packages/parser-jsx/package.json
  73. +3 βˆ’3 packages/parser-jsx/src/parser.ts
  74. +2 βˆ’2 packages/parser-jsx/tsconfig.json
  75. +1 βˆ’0 packages/parser-less/package.json
  76. +1 βˆ’1 packages/parser-less/src/parser.ts
  77. +1 βˆ’1 packages/parser-less/tests/helpers/mocks.ts
  78. +2 βˆ’1 packages/parser-less/tsconfig.json
  79. +1 βˆ’0 packages/parser-sass/package.json
  80. +1 βˆ’1 packages/parser-sass/src/parser.ts
  81. +1 βˆ’1 packages/parser-sass/tests/helpers/mocks.ts
  82. +2 βˆ’1 packages/parser-sass/tsconfig.json
  83. +1 βˆ’0 tsconfig.json
@@ -11,6 +11,7 @@
"@hint/utils": "^6.1.0",
"@hint/utils-connector-tools": "^4.0.14",
"@hint/utils-debug": "^1.0.0",
"@hint/utils-dom": "^1.0.0",
"@types/tough-cookie": "^2.3.5",
"jsdom": "^15.2.0",
"mutationobserver-shim": "^0.3.3"
@@ -32,15 +32,12 @@ import { fork, ChildProcess } from 'child_process';
import { JSDOM, ResourceLoader, VirtualConsole } from 'jsdom';

import {
createHTMLDocument,
getContentTypeData,
getType,
HTMLDocument,
HTMLElement,
HttpHeaders,
isHTMLDocument,
traverse
isHTMLDocument
} from '@hint/utils';
import { createHTMLDocument, HTMLDocument, HTMLElement, traverse } from '@hint/utils-dom';
import { debug as d } from '@hint/utils-debug';
import { Engine, Event, FetchEnd, FetchError, IConnector, NetworkData } from 'hint';
import { Requester } from '@hint/utils-connector-tools';
@@ -2,10 +2,9 @@ import { URL } from 'url';

import {
getContentTypeData,
getElementByUrl,
getType,
HTMLDocument
getType
} from '@hint/utils';
import { getElementByUrl, HTMLDocument } from '@hint/utils-dom';
import { debug as d } from '@hint/utils-debug';
import { ResourceLoader } from 'jsdom';

@@ -18,6 +18,7 @@
{ "path": "../utils" },
{ "path": "../utils-connector-tools" },
{ "path": "../utils-create-server" },
{ "path": "../utils-debug" }
{ "path": "../utils-debug" },
{ "path": "../utils-dom" }
]
}
@@ -9,6 +9,7 @@
},
"dependencies": {
"@hint/utils": "^6.1.0",
"@hint/utils-dom": "^1.0.0",
"@hint/utils-i18n": "^1.0.0",
"chokidar": "^3.2.3",
"globby": "^10.0.1",
@@ -51,14 +51,17 @@ import {
getAsUri,
getContentTypeData,
getType,
HTMLDocument,
HTMLElement,

isFile,
isTextMediaType,
logger,
readFileAsync,
traverse
readFileAsync
} from '@hint/utils';
import {
HTMLDocument,
HTMLElement,
traverse
} from '@hint/utils-dom';

import {
Engine,
@@ -16,6 +16,7 @@
{ "path": "../hint" },
{ "path": "../parser-html" },
{ "path": "../utils" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" }
]
}
@@ -11,6 +11,7 @@
"@hint/utils": "^6.1.0",
"@hint/utils-connector-tools": "^4.0.14",
"@hint/utils-debug": "^1.0.0",
"@hint/utils-dom": "^1.0.0",
"is-ci": "^2.0.0",
"lockfile": "^1.0.4",
"puppeteer-core": "^1.20.0"
@@ -7,14 +7,16 @@ import * as puppeteer from 'puppeteer-core';
import {
Browser,
getInstallationPath,
createHTMLDocument,
traverse,
HTMLElement,
HTMLDocument,
HttpHeaders,
getPlatform,
isRegularProtocol
} from '@hint/utils';
import {
createHTMLDocument,
HTMLElement,
HTMLDocument,
traverse
} from '@hint/utils-dom';
import { debug as d } from '@hint/utils-debug';
import { normalizeHeaders, Requester } from '@hint/utils-connector-tools';
import { IConnector, Engine, NetworkData } from 'hint';
@@ -1,5 +1,6 @@
import * as puppeteer from 'puppeteer-core';
import { getContentTypeData, HTMLDocument, HttpHeaders } from '@hint/utils';
import { getContentTypeData, HttpHeaders } from '@hint/utils';
import { HTMLDocument } from '@hint/utils-dom';
import { normalizeHeaders } from '@hint/utils-connector-tools';
import { FetchEnd, NetworkData } from 'hint';
import { getElementFromResponse } from './get-element-from-response';
@@ -1,5 +1,6 @@
import * as puppeteer from 'puppeteer-core';
import { getType, HTMLDocument } from '@hint/utils';
import { getType } from '@hint/utils';
import { HTMLDocument } from '@hint/utils-dom';
import { debug as d } from '@hint/utils-debug';
import { Events } from 'hint';
import { createFetchEndPayload, Fetcher } from './create-fetchend-payload';
@@ -1,6 +1,6 @@
import * as puppeteer from 'puppeteer-core';

import { getElementByUrl, HTMLElement, HTMLDocument } from '@hint/utils';
import { getElementByUrl, HTMLElement, HTMLDocument } from '@hint/utils-dom';

/** Returns the HTMLElement that initiated a request */
export const getElementFromResponse = (source: puppeteer.Response | puppeteer.Request, dom?: HTMLDocument): HTMLElement | null => {
@@ -1,6 +1,6 @@
import { URL } from 'url';

import { HTMLDocument } from '@hint/utils';
import { HTMLDocument } from '@hint/utils-dom';
import { debug as d } from '@hint/utils-debug';
import { Engine } from 'hint';

@@ -18,6 +18,7 @@
{ "path": "../utils" },
{ "path": "../utils-connector-tools" },
{ "path": "../utils-create-server" },
{ "path": "../utils-debug" }
{ "path": "../utils-debug" },
{ "path": "../utils-dom" }
]
}
@@ -43,6 +43,7 @@
"@hint/parser-manifest": "^2.2.12",
"@hint/utils": "^6.1.0",
"@hint/utils-create-server": "^3.3.0",
"@hint/utils-dom": "^1.0.0",
"@hint/utils-i18n": "^1.0.0",
"@hint/utils-types": "^1.0.0",
"@microsoft/applicationinsights-web-basic": "^2.2.0",
@@ -1,9 +1,15 @@
import { URL } from 'url';

import { Engine } from 'hint';
import { getElementByUrl, HTMLDocument, HTMLElement, traverse } from '@hint/utils/dist/src/dom';
import { createHelpers, restoreReferences } from '@hint/utils/dist/src/dom/snapshot';
import { DocumentData } from '@hint/utils/dist/src/types/snapshot';
import {
createHelpers,
DocumentData,
getElementByUrl,
HTMLDocument,
HTMLElement,
restoreReferences,
traverse
} from '@hint/utils-dom';

import {
ConnectorOptionsConfig,
@@ -47,6 +47,7 @@
{ "path": "../parser-manifest" },
{ "path": "../utils" },
{ "path": "../utils-create-server" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-types" }
]
@@ -16,6 +16,7 @@
"description": "hint for best practices related to the apple-touch-icons",
"devDependencies": {
"@hint/utils-tests-helpers": "^5.1.0",
"@hint/utils-dom": "^1.0.0",
"@types/image-size": "^0.7.0",
"@types/node": "^12.7.5",
"@typescript-eslint/eslint-plugin": "^1.13.0",
@@ -6,7 +6,8 @@ import { imageSize as getImageData } from 'image-size';
import { isRegularProtocol, normalizeString } from '@hint/utils';
import { debug as d } from '@hint/utils-debug';
import { HintContext, IHint, NetworkData, TraverseEnd } from 'hint';
import { HTMLElement, HTMLDocument } from '@hint/utils/dist/src/dom/html';
import { HTMLDocument } from '@hint/utils-dom/dist/src/htmldocument';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';

import meta from './meta';
import { getMessage } from './i18n.import';
@@ -16,6 +16,7 @@
{ "path": "../hint" },
{ "path": "../utils" },
{ "path": "../utils-debug" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -16,6 +16,7 @@
"description": "hint that that checks using axe for accessibility related best practices",
"devDependencies": {
"@hint/utils-tests-helpers": "^5.1.0",
"@hint/utils-dom": "^1.0.0",
"@types/node": "^12.7.5",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.12.0",
@@ -1,6 +1,7 @@
import { CheckResult, AxeResults, ImpactValue, NodeResult as AxeNodeResult } from 'axe-core';

import { HTMLDocument, HTMLElement } from '@hint/utils/dist/src/dom/html';
import { HTMLDocument } from '@hint/utils-dom/dist/src/htmldocument';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';
import { readFileAsync } from '@hint/utils/dist/src/fs/read-file-async';
import { CanEvaluateScript } from 'hint/dist/src/lib/types';
import { HintContext } from 'hint/dist/src/lib/hint-context';
@@ -15,6 +15,7 @@
"references": [
{ "path": "../hint" },
{ "path": "../utils" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -17,6 +17,7 @@
"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.14",
"@hint/utils-dom": "^1.0.0",
"@hint/utils-tests-helpers": "^5.1.0",
"@types/lodash": "^4.14.141",
"@types/node": "^12.7.5",
@@ -4,7 +4,8 @@

import { HintContext } from 'hint/dist/src/lib/hint-context';
import { IHint } from 'hint/dist/src/lib/types';
import { HTMLAttribute, HTMLElement } from '@hint/utils';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';
import { HTMLAttribute } from '@hint/utils-dom/dist/src/types';
import { getUnsupportedDetails, UnsupportedBrowsers } from '@hint/utils-compat-data';

import { filterBrowsers, joinBrowsers } from './utils/browsers';
@@ -17,6 +17,7 @@
{ "path": "../parser-css" },
{ "path": "../utils" },
{ "path": "../utils-compat-data" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -16,6 +16,7 @@
},
"description": "hint that that checks if external links disown the opener",
"devDependencies": {
"@hint/utils-dom": "^1.0.0",
"@hint/utils-tests-helpers": "^5.1.0",
"@types/node": "^12.7.5",
"@typescript-eslint/eslint-plugin": "^1.13.0",
@@ -15,10 +15,10 @@ import { URL } from 'url';
import { debug as d } from '@hint/utils-debug';
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';
import { normalizeString } from '@hint/utils/dist/src/misc/normalize-string';
import { prettyPrintArray } from '@hint/utils/dist/src/misc/pretty-print-array';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';
import { ElementFound, IHint } from 'hint/dist/src/lib/types';
import { HintContext } from 'hint/dist/src/lib/hint-context';

@@ -17,6 +17,7 @@
{ "path": "../utils" },
{ "path": "../utils-compat-data" },
{ "path": "../utils-debug" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -14,6 +14,7 @@
},
"description": "hint for best practices related to usage of the X-UA-Compatible meta tag and response header",
"devDependencies": {
"@hint/utils-dom": "^1.0.0",
"@hint/utils-tests-helpers": "^5.1.0",
"@types/node": "^12.7.5",
"@typescript-eslint/eslint-plugin": "^1.13.0",
@@ -12,7 +12,8 @@
import { HttpHeaders } from '@hint/utils/dist/src/types/http-header';
import { normalizeString } from '@hint/utils/dist/src/misc/normalize-string';
import { isLocalFile } from '@hint/utils/dist/src/network/is-local-file';
import { HTMLDocument, HTMLElement } from '@hint/utils/dist/src/dom/html';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';
import { HTMLDocument } from '@hint/utils-dom/dist/src/htmldocument';
import { IHint, TraverseEnd } from 'hint/dist/src/lib/types';
import { HintContext } from 'hint/dist/src/lib/hint-context';

@@ -15,6 +15,7 @@
"references": [
{ "path": "../hint" },
{ "path": "../utils" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -15,6 +15,7 @@
},
"description": "hint for HTTP compression related best practices",
"devDependencies": {
"@hint/utils-dom": "^1.0.0",
"@hint/utils-tests-helpers": "^5.1.0",
"@types/iltorb": "^2.3.0",
"@types/mock-require": "^2.0.0",
@@ -15,13 +15,13 @@ import {
asyncTry,
getFileExtension,
isTextMediaType,
HTMLElement,
HttpHeaders,
isHTTP,
isRegularProtocol,
normalizeHeaderValue,
normalizeString
} from '@hint/utils';
import { HTMLElement } from '@hint/utils-dom';
import { FetchEnd, HintContext, IHint, NetworkData, Response } from 'hint';

import { CompressionCheckOptions } from './types';
@@ -15,6 +15,7 @@
"references": [
{ "path": "../hint" },
{ "path": "../utils" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -17,6 +17,7 @@
},
"description": "hint that that checks using Cloudinary's API if images are optimized",
"devDependencies": {
"@hint/utils-dom": "^1.0.0",
"@hint/utils-tests-helpers": "^5.1.0",
"@types/mock-require": "^2.0.0",
"@types/node": "^12.7.5",
@@ -1,5 +1,5 @@
/* eslint-disable camelcase */
import { HTMLElement } from '@hint/utils/dist/src/dom/html';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';

export type cloudinaryResult = {
bytes: number;
@@ -15,6 +15,7 @@
"references": [
{ "path": "../hint" },
{ "path": "../utils" },
{ "path": "../utils-dom" },
{ "path": "../utils-i18n" },
{ "path": "../utils-tests-helpers" },
{ "path": "../utils-types" }
@@ -16,6 +16,7 @@
},
"description": "hint for best practices related to the 'theme-color' meta tag",
"devDependencies": {
"@hint/utils-dom": "^1.0.0",
"@hint/utils-tests-helpers": "^5.1.0",
"@types/color-string": "^1.5.0",
"@types/node": "^12.7.5",
@@ -17,7 +17,8 @@ import {
IHint,
TraverseEnd
} from 'hint';
import { HTMLElement, normalizeString } from '@hint/utils';
import { normalizeString } from '@hint/utils';
import { HTMLElement } from '@hint/utils-dom/dist/src/htmlelement';
import { isSupported } from '@hint/utils-compat-data';

import meta from './meta';

0 comments on commit d95dc4a

Please sign in to comment.
You can’t perform that action at this time.