How to use the puppeteer/package.json.version function in puppeteer

To help you get started, we’ve selected a few puppeteer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / incubator-echarts / test / runTest / server.js View on Github external
function checkPuppeteer() {
    try {
        const packageConfig = require('puppeteer/package.json');
        return semver.satisfies(packageConfig.version, '>=1.19.0');
    }
    catch (e) {
        return false;
    }
}
github rialto-php / puphpeteer / src / get-puppeteer-version.js View on Github external
'use strict';

function output(value) {
    process.stdout.write(JSON.stringify(value));
}

try {
    const manifest = require('puppeteer/package.json');
    output(manifest.version);
} catch (exception) {
    output(null);
}