Socket
Socket
Sign inDemoInstall

chrome-remote-interface

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-remote-interface - npm Package Compare versions

Comparing version 0.23.1 to 0.23.2

29

lib/devtools.js

@@ -31,3 +31,11 @@ 'use strict';

if (browser.match(/^(Headless)?Chrome\//)) {
fetcher = fetchFromChromeRepo;
// https://bugs.chromium.org/p/chromium/issues/detail?id=538300#c10
const firstJsonProtocolVersion = '60.0.3097.0';
const firstJsonProtocolBuild = explodeChromeVersion(firstJsonProtocolVersion)[2];
const chromeBuild = explodeChromeVersion(info.Browser.split('/')[1])[2];
if (chromeBuild < firstJsonProtocolBuild) {
fetcher = fetchFromChromeRepo;
} else {
fetcher = fetchFromHttpEndpoint;
}
} else if (browser.match(/^Microsoft Edge /)) {

@@ -148,2 +156,8 @@ fetcher = fetchFromHttpEndpoint;

function explodeChromeVersion(v) {
return v.split('.').map(function (x) {
return parseInt(x);
});
}
// callback(err, descriptor)

@@ -153,7 +167,2 @@ // XXX this function needs a proper refactor but the inconsistency of the

function fetchFromChromeRepo(options, info, callback) {
function explodeVersion(v) {
return v.split('.').map(function (x) {
return parseInt(x);
});
}
// attempt to fetch the protocol directly from the Chromium repository

@@ -175,6 +184,6 @@ // according to the current version

const lastBeforeV8ChromeVersion = '55.0.2854.3'; // before using the JSON from the V8 repo
const chromeVersion = explodeVersion(info.Browser.split('/')[1]);
// according to https://www.chromium.org/developers/version-numbers
const beforeSplit = (chromeVersion[2] <= explodeVersion(lastBeforeSplitChromeVersion)[2]); // patch not meaningful
const beforeFromV8 = (chromeVersion[2] <= explodeVersion(lastBeforeV8ChromeVersion)[2]); // patch not meaningful
const chromeVersion = explodeChromeVersion(info.Browser.split('/')[1]);
// according to https://www.chromium.org/developers/version-numbers (patch not meaningful)
const beforeSplit = (chromeVersion[2] <= explodeChromeVersion(lastBeforeSplitChromeVersion)[2]);
const beforeFromV8 = (chromeVersion[2] <= explodeChromeVersion(lastBeforeV8ChromeVersion)[2]);
if (beforeSplit) {

@@ -181,0 +190,0 @@ urls = [`https://chromium.googlesource.com/chromium/src/+/${hash}/third_party/WebKit/Source/devtools/protocol.json?format=TEXT`];

@@ -12,3 +12,3 @@ {

"homepage": "https://github.com/cyrus-and/chrome-remote-interface",
"version": "0.23.1",
"version": "0.23.2",
"repository": {

@@ -15,0 +15,0 @@ "type": "git",

@@ -116,14 +116,6 @@ chrome-remote-interface [![Build Status](https://travis-ci.org/cyrus-and/chrome-remote-interface.svg?branch=master)](https://travis-ci.org/cyrus-and/chrome-remote-interface)

Since version 57, additionally use the `--headless` option, for example:
Since version 59, additionally use the `--headless` option, for example:
google-chrome --headless --remote-debugging-port=9222
Please note that currently the *DevTools* methods are not properly supported in
headless mode; use the [Target domain] instead. See [#83] and [#84] for more
information.
[#83]: https://github.com/cyrus-and/chrome-remote-interface/issues/83
[#84]: https://github.com/cyrus-and/chrome-remote-interface/issues/84
[Target domain]: https://chromedevtools.github.io/debugger-protocol-viewer/tot/Target/
#### Android

@@ -356,4 +348,4 @@

Currently Chrome is not able to do that (see [#10]), so the protocol descriptor
is fetched from the proper [source repository].
Chrome < 60.0.3097.0 is not able to do that, so in that case the protocol
descriptor is fetched from the source repository.

@@ -372,4 +364,2 @@ To override the above behavior there are basically three options:

[local version]: lib/protocol.json
[#10]: https://github.com/cyrus-and/chrome-remote-interface/issues/10
[source repository]: https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/

@@ -386,3 +376,3 @@ Browser usage

```js
function criRequest(options, callback) {}
function criRequest(options, callback) {}
```

@@ -389,0 +379,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc