192 lines
35 KiB
JSON
192 lines
35 KiB
JSON
|
|
{
|
||
|
|
"_args": [
|
||
|
|
[
|
||
|
|
{
|
||
|
|
"raw": "jsdom@^11.5.1",
|
||
|
|
"scope": null,
|
||
|
|
"escapedName": "jsdom",
|
||
|
|
"name": "jsdom",
|
||
|
|
"rawSpec": "^11.5.1",
|
||
|
|
"spec": ">=11.5.1 <12.0.0",
|
||
|
|
"type": "range"
|
||
|
|
},
|
||
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/jest-environment-jsdom"
|
||
|
|
]
|
||
|
|
],
|
||
|
|
"_from": "jsdom@>=11.5.1 <12.0.0",
|
||
|
|
"_id": "jsdom@11.6.2",
|
||
|
|
"_inCache": true,
|
||
|
|
"_location": "/jsdom",
|
||
|
|
"_nodeVersion": "8.9.4",
|
||
|
|
"_npmOperationalInternal": {
|
||
|
|
"host": "s3://npm-registry-packages",
|
||
|
|
"tmp": "tmp/jsdom-11.6.2.tgz_1517279571318_0.11436918587423861"
|
||
|
|
},
|
||
|
|
"_npmUser": {
|
||
|
|
"name": "domenic",
|
||
|
|
"email": "d@domenic.me"
|
||
|
|
},
|
||
|
|
"_npmVersion": "5.6.0",
|
||
|
|
"_phantomChildren": {
|
||
|
|
"async-limiter": "1.0.0",
|
||
|
|
"safe-buffer": "5.1.1"
|
||
|
|
},
|
||
|
|
"_requested": {
|
||
|
|
"raw": "jsdom@^11.5.1",
|
||
|
|
"scope": null,
|
||
|
|
"escapedName": "jsdom",
|
||
|
|
"name": "jsdom",
|
||
|
|
"rawSpec": "^11.5.1",
|
||
|
|
"spec": ">=11.5.1 <12.0.0",
|
||
|
|
"type": "range"
|
||
|
|
},
|
||
|
|
"_requiredBy": [
|
||
|
|
"/jest-environment-jsdom"
|
||
|
|
],
|
||
|
|
"_resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.6.2.tgz",
|
||
|
|
"_shasum": "25d1ef332d48adf77fc5221fe2619967923f16bb",
|
||
|
|
"_shrinkwrap": null,
|
||
|
|
"_spec": "jsdom@^11.5.1",
|
||
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/jest-environment-jsdom",
|
||
|
|
"browser": {
|
||
|
|
"canvas": false,
|
||
|
|
"vm": "./lib/jsdom/vm-shim.js",
|
||
|
|
"./lib/jsdom/living/websockets/WebSocket-impl.js": "./lib/jsdom/living/websockets/WebSocket-impl-browser.js"
|
||
|
|
},
|
||
|
|
"bugs": {
|
||
|
|
"url": "https://github.com/jsdom/jsdom/issues"
|
||
|
|
},
|
||
|
|
"dependencies": {
|
||
|
|
"abab": "^1.0.4",
|
||
|
|
"acorn": "^5.3.0",
|
||
|
|
"acorn-globals": "^4.1.0",
|
||
|
|
"array-equal": "^1.0.0",
|
||
|
|
"browser-process-hrtime": "^0.1.2",
|
||
|
|
"content-type-parser": "^1.0.2",
|
||
|
|
"cssom": ">= 0.3.2 < 0.4.0",
|
||
|
|
"cssstyle": ">= 0.2.37 < 0.3.0",
|
||
|
|
"domexception": "^1.0.0",
|
||
|
|
"escodegen": "^1.9.0",
|
||
|
|
"html-encoding-sniffer": "^1.0.2",
|
||
|
|
"left-pad": "^1.2.0",
|
||
|
|
"nwmatcher": "^1.4.3",
|
||
|
|
"parse5": "4.0.0",
|
||
|
|
"pn": "^1.1.0",
|
||
|
|
"request": "^2.83.0",
|
||
|
|
"request-promise-native": "^1.0.5",
|
||
|
|
"sax": "^1.2.4",
|
||
|
|
"symbol-tree": "^3.2.2",
|
||
|
|
"tough-cookie": "^2.3.3",
|
||
|
|
"w3c-hr-time": "^1.0.1",
|
||
|
|
"webidl-conversions": "^4.0.2",
|
||
|
|
"whatwg-encoding": "^1.0.3",
|
||
|
|
"whatwg-url": "^6.4.0",
|
||
|
|
"ws": "^4.0.0",
|
||
|
|
"xml-name-validator": "^3.0.0"
|
||
|
|
},
|
||
|
|
"description": "A JavaScript implementation of many web standards",
|
||
|
|
"devDependencies": {
|
||
|
|
"benchmark": "1.0.0",
|
||
|
|
"browserify": "^14.5.0",
|
||
|
|
"chai": "^4.1.2",
|
||
|
|
"eslint": "^4.16.0",
|
||
|
|
"eslint-find-rules": "^3.1.1",
|
||
|
|
"eslint-plugin-html": "^4.0.1",
|
||
|
|
"js-yaml": "^3.10.0",
|
||
|
|
"karma": "^1.7.1",
|
||
|
|
"karma-browserify": "^5.1.3",
|
||
|
|
"karma-chrome-launcher": "^2.2.0",
|
||
|
|
"karma-mocha": "^1.3.0",
|
||
|
|
"karma-mocha-webworker": "^1.3.0",
|
||
|
|
"karma-sauce-launcher": "^1.2.0",
|
||
|
|
"minimatch": "^3.0.4",
|
||
|
|
"mocha": "^3.5.2",
|
||
|
|
"mocha-sugar-free": "^1.3.1",
|
||
|
|
"optimist": "0.6.1",
|
||
|
|
"portfinder": "^1.0.13",
|
||
|
|
"q": "^1.5.1",
|
||
|
|
"rimraf": "^2.6.2",
|
||
|
|
"server-destroy": "^1.0.1",
|
||
|
|
"st": "^1.2.2",
|
||
|
|
"watchify": "^3.9.0",
|
||
|
|
"wd": "^1.5.0",
|
||
|
|
"webidl2js": "^9.0.0"
|
||
|
|
},
|
||
|
|
"directories": {},
|
||
|
|
"dist": {
|
||
|
|
"integrity": "sha512-pAeZhpbSlUp5yQcS6cBQJwkbzmv4tWFaYxHbFVSxzXefqjvtRA851Z5N2P+TguVG9YeUDcgb8pdeVQRJh0XR3Q==",
|
||
|
|
"shasum": "25d1ef332d48adf77fc5221fe2619967923f16bb",
|
||
|
|
"tarball": "https://registry.npmjs.org/jsdom/-/jsdom-11.6.2.tgz"
|
||
|
|
},
|
||
|
|
"gitHead": "1cd4831e36b40c8041237d5cf184f229f358ffc0",
|
||
|
|
"homepage": "https://github.com/jsdom/jsdom#readme",
|
||
|
|
"keywords": [
|
||
|
|
"dom",
|
||
|
|
"html",
|
||
|
|
"whatwg",
|
||
|
|
"w3c"
|
||
|
|
],
|
||
|
|
"license": "MIT",
|
||
|
|
"main": "./lib/api.js",
|
||
|
|
"maintainers": [
|
||
|
|
{
|
||
|
|
"name": "Elijah Insua",
|
||
|
|
"email": "tmpvar@gmail.com",
|
||
|
|
"url": "http://tmpvar.com"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "Domenic Denicola",
|
||
|
|
"email": "d@domenic.me",
|
||
|
|
"url": "https://domenic.me/"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "Sebastian Mayr",
|
||
|
|
"email": "sebmaster16@gmail.com",
|
||
|
|
"url": "https://blog.smayr.name/"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "Joris van der Wel",
|
||
|
|
"email": "joris@jorisvanderwel.com"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "Timothy Gu",
|
||
|
|
"email": "timothygu99@gmail.com",
|
||
|
|
"url": "https://timothygu.me/"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "Zirro",
|
||
|
|
"email": "code@zirro.se"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"name": "jsdom",
|
||
|
|
"optionalDependencies": {},
|
||
|
|
"readme": "# jsdom\n\njsdom is a pure-JavaScript implementation of many web standards, notably the WHATWG [DOM](https://dom.spec.whatwg.org/) and [HTML](https://html.spec.whatwg.org/multipage/) Standards, for use with Node.js. In general, the goal of the project is to emulate enough of a subset of a web browser to be useful for testing and scraping real-world web applications.\n\nThe latest versions of jsdom require Node.js v6 or newer. (Versions of jsdom below v10 still work with Node.js v4, but are unsupported.)\n\nAs of v10, jsdom has a new API (documented below). The old API is still supported for now; [see its documentation](./lib/old-api.md) for details.\n\n## Basic usage\n\n```js\nconst jsdom = require(\"jsdom\");\nconst { JSDOM } = jsdom;\n```\n\nTo use jsdom, you will primarily use the `JSDOM` constructor, which is a named export of the jsdom main module. Pass the constructor a string. You will get back a `JSDOM` object, which has a number of useful properties, notably `window`:\n\n```js\nconst dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);\nconsole.log(dom.window.document.querySelector(\"p\").textContent); // \"Hello world\"\n```\n\n(Note that jsdom will parse the HTML you pass it just like a browser does, including implied `<html>`, `<head>`, and `<body>` tags.)\n\nThe resulting object is an instance of the `JSDOM` class, which contains a number of useful properties and methods besides `window`. In general it can be used to act on the jsdom from the \"outside,\" doing things that are not possible with the normal DOM APIs. For simple cases, where you don't need any of this functionality, we recommend a coding pattern like\n\n```js\nconst { window } = new JSDOM(`...`);\n// or even\nconst { document } = (new JSDOM(`...`)).window;\n```\n\nFull documentation on everything you can do with the `JSDOM` class is below, in the section \"`JSDOM` Object API\".\n\n## Customizing jsdom\n\nThe `JSDOM` constructor accepts a second parameter which can be used to customize your jsdom in the following ways.\n\n### Simple options\n\n```js\nconst dom = new JSDOM(``, {\n url: \"https://example.org/\",\n referrer: \"https://example.com/\",\n contentType: \"text/html\",\n userAgent: \"Mellblomenator/9000\",\n includeNodeLocations: true\n});\n```\n\n- `url` sets the value returned by `window.location`, `document.URL`, and `document.documentURI`, and affects things like resolution of relative URLs within the document and the same-origin restrictions and referrer used while fetching subresources. It defaults to `\"about:blank\"`.\n- `referrer` just affects the value read from `document.referrer`. It defaults to no referrer (which reflects as the empty string).\n- `contentType` affects the value read from `document.contentType`, and how the document is parsed: as HTML or as XML. Values that are not `\"text/html\"` or an [XML mime type](https://html.spec.whatwg.org/multipage/infrastructure.html#xml-mime-type) will throw. It defaults to `\"text/html\"`.\n- `userAgent` affects the value read from `navigator.userAgent`, as well as the `User-Agent` header sent while fetching subresources. It defaults to <code>\\`Mozilla/5.0 (${process.platform}) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/${jsdomVersion}\\`</code>.\n- `includeNodeLocations` preserves the location info produced by the HTML parser, allowing you to retrieve it with the `nodeLocation()` method (described below). It also ensures that line numbers reported in exception stack traces for code running inside `<script>` elements are correct. It defaults to `false` to give the best performance, and cannot be used with an XML content type since our XML parser does not support location info.\n\nNote that both `url` and `referrer` are canonicalized before they're used, so e.g. if you pass in `\"https:example.com\"`, jsdom will interpret that as if you had given `\"https://example.com/\"`. If you pass an unparseable URL, the call will throw. (URLs are parsed and serialized according to the [URL Standard](http://url.spec.whatwg.org/).)\n\n### Executing scripts\n\njsdom's most
|
||
|
|
"readmeFilename": "README.md",
|
||
|
|
"repository": {
|
||
|
|
"type": "git",
|
||
|
|
"url": "git+https://github.com/jsdom/jsdom.git"
|
||
|
|
},
|
||
|
|
"scripts": {
|
||
|
|
"benchmark": "node ./benchmark/runner",
|
||
|
|
"benchmark-browser": "node ./benchmark/runner --bundle",
|
||
|
|
"convert-idl": "node ./scripts/webidl/convert",
|
||
|
|
"init-wpt": "git submodule update --init --recursive",
|
||
|
|
"lint": "eslint . && eslint test/web-platform-tests/to-upstream --ext .html",
|
||
|
|
"lint-is-complete": "eslint-find-rules --unused .eslintrc.json",
|
||
|
|
"prepare": "yarn convert-idl",
|
||
|
|
"pretest": "yarn convert-idl && yarn init-wpt",
|
||
|
|
"reset-wpt": "rimraf ./test/web-platform-tests/tests && yarn init-wpt",
|
||
|
|
"test": "mocha test/index.js",
|
||
|
|
"test-api": "mocha test/api",
|
||
|
|
"test-browser": "yarn test-browser-iframe && yarn test-browser-worker",
|
||
|
|
"test-browser-iframe": "karma start test/karma.conf.js",
|
||
|
|
"test-browser-worker": "karma start test/karma-webworker.conf.js",
|
||
|
|
"test-mocha": "mocha",
|
||
|
|
"test-tuwpt": "mocha test/web-platform-tests/run-tuwpts.js",
|
||
|
|
"test-wpt": "mocha test/web-platform-tests/run-wpts.js",
|
||
|
|
"update-authors": "git log --format=\"%aN <%aE>\" | sort -f | uniq > AUTHORS.txt",
|
||
|
|
"update-wpt": "git submodule update --recursive --remote && cd test/web-platform-tests/tests && python wpt.py manifest --path ../wpt-manifest.json"
|
||
|
|
},
|
||
|
|
"version": "11.6.2"
|
||
|
|
}
|