From a5d175cdd1974007357b768fd2dadc912fc39d17 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 10 Jun 2017 09:01:01 +0000 Subject: [PATCH 1/5] chore(package): update dependencies --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index bf58ac5..7437d61 100644 --- a/package.json +++ b/package.json @@ -36,13 +36,13 @@ }, "homepage": "https://github.com/lukechilds/window#readme", "dependencies": { - "jsdom": "9.11.0" + "jsdom": "11.0.0" }, "devDependencies": { - "ava": "^0.18.0", + "ava": "^0.19.1", "coveralls": "^2.11.13", "eslint-config-xo-lukechilds": "^1.0.0", - "nyc": "^10.0.0", - "xo": "^0.17.1" + "nyc": "^11.0.2", + "xo": "^0.18.2" } } From 89c7ae348bbadfdb29f801add7c718dd09f14132 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 10 Jun 2017 09:01:04 +0000 Subject: [PATCH 2/5] docs(readme): add Greenkeeper badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3f24e8a..5cc771f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # window +[![Greenkeeper badge](https://badges.greenkeeper.io/lukechilds/window.svg)](https://greenkeeper.io/) + > Exports a [`jsdom`](https://github.com/tmpvar/jsdom) window object. [![Build Status](https://travis-ci.org/lukechilds/window.svg?branch=master)](https://travis-ci.org/lukechilds/window) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/window/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/window?branch=master) [![npm](https://img.shields.io/npm/dm/window.svg)](https://www.npmjs.com/package/window) From d1d80df7848b62d743c3d02d322c933bfa696253 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 30 Jun 2017 10:32:42 +0100 Subject: [PATCH 3/5] jsdom 11 compat --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 45354bc..1f51ebe 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ 'use strict'; -const jsdom = require('jsdom'); +const { JSDOM } = require('jsdom'); // Class to return a window instance. // Accepts a jsdom config object. @@ -8,6 +8,6 @@ const jsdom = require('jsdom'); // lots of properties to the original reference. module.exports = class Window { constructor(jsdomConfig) { - return jsdom.jsdom('', Object.assign({}, jsdomConfig)).defaultView; + return (new JSDOM('', Object.assign({}, jsdomConfig))).window; } }; From 6e201839df568a690a5ce0698d341271d4f4484b Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 30 Jun 2017 11:59:15 +0100 Subject: [PATCH 4/5] jsdom now only support Node.js v6 or newer --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c2f25b..4741432 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: node_js node_js: - 'node' - '6' - - '4' script: npm run lint && npm test after_success: npm run coverage notifications: From 560fce127cf648275c6b5caf2041e250c54c8bac Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 30 Jun 2017 12:14:09 +0100 Subject: [PATCH 5/5] Update expected properties --- test/fixtures/expectedProperties.json | 228 +++++++++++++------------- 1 file changed, 115 insertions(+), 113 deletions(-) diff --git a/test/fixtures/expectedProperties.json b/test/fixtures/expectedProperties.json index 94d23e3..fa9963c 100644 --- a/test/fixtures/expectedProperties.json +++ b/test/fixtures/expectedProperties.json @@ -1,72 +1,70 @@ [ - "DOMException", - "NamedNodeMap", + "ArrayBuffer", "Attr", - "Node", - "Element", - "DocumentFragment", - "HTMLDocument", - "Document", - "XMLDocument", - "CharacterData", - "Text", + "Audio", + "Blob", "CDATASection", - "ProcessingInstruction", + "CSSImportRule", + "CSSMediaRule", + "CSSRule", + "CSSStyleDeclaration", + "CSSStyleRule", + "CSSStyleSheet", + "CharacterData", "Comment", - "DocumentType", - "DOMImplementation", - "Event", "CustomEvent", - "MessageEvent", + "DOMException", + "DOMImplementation", + "DOMParser", + "DOMTokenList", + "Document", + "DocumentFragment", + "DocumentType", + "Element", "ErrorEvent", - "HashChangeEvent", - "FocusEvent", - "PopStateEvent", - "UIEvent", - "MouseEvent", - "KeyboardEvent", - "TouchEvent", - "ProgressEvent", + "Event", "EventTarget", - "Location", - "History", - "Blob", "File", "FileList", - "DOMParser", + "FileReader", + "Float32Array", + "Float64Array", + "FocusEvent", "FormData", - "HTMLElement", "HTMLAnchorElement", "HTMLAppletElement", "HTMLAreaElement", "HTMLAudioElement", + "HTMLBRElement", "HTMLBaseElement", "HTMLBodyElement", - "HTMLBRElement", "HTMLButtonElement", "HTMLCanvasElement", + "HTMLCollection", + "HTMLDListElement", "HTMLDataElement", "HTMLDataListElement", "HTMLDialogElement", "HTMLDirectoryElement", "HTMLDivElement", - "HTMLDListElement", + "HTMLDocument", + "HTMLElement", "HTMLEmbedElement", "HTMLFieldSetElement", "HTMLFontElement", "HTMLFormElement", "HTMLFrameElement", "HTMLFrameSetElement", - "HTMLHeadingElement", - "HTMLHeadElement", "HTMLHRElement", + "HTMLHeadElement", + "HTMLHeadingElement", "HTMLHtmlElement", "HTMLIFrameElement", "HTMLImageElement", "HTMLInputElement", + "HTMLLIElement", "HTMLLabelElement", "HTMLLegendElement", - "HTMLLIElement", "HTMLLinkElement", "HTMLMapElement", "HTMLMediaElement", @@ -74,8 +72,8 @@ "HTMLMetaElement", "HTMLMeterElement", "HTMLModElement", - "HTMLObjectElement", "HTMLOListElement", + "HTMLObjectElement", "HTMLOptGroupElement", "HTMLOptionElement", "HTMLOutputElement", @@ -95,119 +93,123 @@ "HTMLTableDataCellElement", "HTMLTableElement", "HTMLTableHeaderCellElement", - "HTMLTimeElement", - "HTMLTitleElement", "HTMLTableRowElement", "HTMLTableSectionElement", "HTMLTemplateElement", "HTMLTextAreaElement", + "HTMLTimeElement", + "HTMLTitleElement", "HTMLTrackElement", "HTMLUListElement", "HTMLUnknownElement", "HTMLVideoElement", - "StyleSheet", + "HashChangeEvent", + "History", + "Image", + "Int16Array", + "Int32Array", + "Int8Array", + "KeyboardEvent", + "Location", "MediaList", - "CSSStyleSheet", - "CSSRule", - "CSSStyleRule", - "CSSMediaRule", - "CSSImportRule", - "CSSStyleDeclaration", - "StyleSheetList", - "XPathException", - "XPathExpression", - "XPathResult", - "XPathEvaluator", - "HTMLCollection", + "MessageEvent", + "MouseEvent", + "NamedNodeMap", + "Node", "NodeFilter", "NodeIterator", "NodeList", - "XMLHttpRequestEventTarget", - "XMLHttpRequestUpload", - "DOMTokenList", + "Option", + "PopStateEvent", + "ProcessingInstruction", + "ProgressEvent", + "StyleSheet", + "StyleSheetList", + "Text", + "TouchEvent", + "UIEvent", "URL", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray", "Window", + "XMLDocument", + "XMLHttpRequest", + "XMLHttpRequestEventTarget", + "XMLHttpRequestUpload", + "XPathEvaluator", + "XPathException", + "XPathExpression", + "XPathResult", + "__stopAllTimers", + "__timers", "_core", + "_currentSessionHistoryEntryIndex", + "_document", + "_eventHandlers", + "_frameElement", "_globalProxy", - "__timers", - "_top", + "_length", "_parent", - "_frameElement", - "_document", + "_runScripts", "_sessionHistory", - "_currentSessionHistoryEntryIndex", - "_length", + "_top", "_virtualConsole", - "length", - "window", - "frameElement", - "frames", - "self", - "parent", - "top", - "document", - "location", - "history", - "navigator", "addEventListener", - "removeEventListener", - "dispatchEvent", - "setTimeout", - "setInterval", - "clearInterval", - "clearTimeout", - "__stopAllTimers", - "Image", - "Audio", - "postMessage", + "alert", "atob", + "blur", "btoa", - "FileReader", - "XMLHttpRequest", - "ArrayBuffer", - "Int8Array", - "Uint8Array", - "Uint8ClampedArray", - "Int16Array", - "Uint16Array", - "Int32Array", - "Uint32Array", - "Float32Array", - "Float64Array", - "stop", + "clearInterval", + "clearTimeout", "close", - "getComputedStyle", - "console", - "name", - "innerWidth", - "innerHeight", - "outerWidth", - "outerHeight", - "pageXOffset", - "pageYOffset", - "screenX", - "screenY", - "screenLeft", - "screenTop", - "scrollX", - "scrollY", - "scrollTop", - "scrollLeft", - "screen", - "alert", - "blur", "confirm", + "console", "createPopup", + "dispatchEvent", + "document", "focus", + "frameElement", + "frames", + "getComputedStyle", + "history", + "innerHeight", + "innerWidth", + "length", + "location", "moveBy", "moveTo", + "name", + "navigator", "open", + "outerHeight", + "outerWidth", + "pageXOffset", + "pageYOffset", + "parent", + "postMessage", "print", "prompt", + "removeEventListener", "resizeBy", "resizeTo", + "screen", + "screenLeft", + "screenTop", + "screenX", + "screenY", "scroll", "scrollBy", + "scrollLeft", "scrollTo", - "toString" + "scrollTop", + "scrollX", + "scrollY", + "self", + "setInterval", + "setTimeout", + "stop", + "top", + "window" ]