mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(deps): update deps
Signed-off-by: Randolf Jung <jrandolf@chromium.org> Co-authored-by: Randolf Jung <jrandolf@chromium.org>
This commit is contained in:
parent
523b487e88
commit
8ff9d598bf
@ -25,5 +25,5 @@
|
|||||||
* This means that we can publish to CJS and ESM whilst maintaining the expected
|
* This means that we can publish to CJS and ESM whilst maintaining the expected
|
||||||
* import behaviour for CJS and ESM users.
|
* import behaviour for CJS and ESM users.
|
||||||
*/
|
*/
|
||||||
const puppeteerExport = require('./lib/cjs/puppeteer/node-puppeteer-core');
|
const puppeteerExport = require('./lib/cjs/puppeteer/node-puppeteer-core.js');
|
||||||
module.exports = puppeteerExport.default;
|
module.exports = puppeteerExport.default;
|
||||||
|
@ -25,5 +25,5 @@
|
|||||||
* This means that we can publish to CJS and ESM whilst maintaining the expected
|
* This means that we can publish to CJS and ESM whilst maintaining the expected
|
||||||
* import behaviour for CJS and ESM users.
|
* import behaviour for CJS and ESM users.
|
||||||
*/
|
*/
|
||||||
const puppeteerExport = require('./lib/cjs/puppeteer/node');
|
const puppeteerExport = require('./lib/cjs/puppeteer/node.js');
|
||||||
module.exports = puppeteerExport.default;
|
module.exports = puppeteerExport.default;
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2022 Google Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
import { dirname } from 'path';
|
import { dirname } from 'path';
|
||||||
|
|
||||||
export const puppeteerDirname = dirname(dirname(dirname(__dirname)));
|
export const puppeteerDirname = dirname(dirname(dirname(__dirname)));
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2022 Google Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
import { dirname } from 'path';
|
import { dirname } from 'path';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* necessary.
|
* necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const compileTypeScriptIfRequired = require('./typescript-if-required');
|
const compileTypeScriptIfRequired = require('./typescript-if-required.js');
|
||||||
|
|
||||||
async function download() {
|
async function download() {
|
||||||
await compileTypeScriptIfRequired();
|
await compileTypeScriptIfRequired();
|
||||||
@ -32,7 +32,7 @@ async function download() {
|
|||||||
const {
|
const {
|
||||||
downloadBrowser,
|
downloadBrowser,
|
||||||
logPolitely,
|
logPolitely,
|
||||||
} = require('./lib/cjs/puppeteer/node/install');
|
} = require('./lib/cjs/puppeteer/node/install.js');
|
||||||
|
|
||||||
if (process.env.PUPPETEER_SKIP_DOWNLOAD) {
|
if (process.env.PUPPETEER_SKIP_DOWNLOAD) {
|
||||||
logPolitely(
|
logPolitely(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const base = require('./base');
|
const base = require('./base.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...base,
|
...base,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const base = require('./base');
|
const base = require('./base.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...base,
|
...base,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const base = require('./base');
|
const base = require('./base.js');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...base,
|
...base,
|
||||||
|
48
package.json
48
package.json
@ -67,61 +67,61 @@
|
|||||||
"author": "The Chromium Authors",
|
"author": "The Chromium Authors",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"cross-fetch": "3.1.5",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
"devtools-protocol": "0.0.960912",
|
"devtools-protocol": "0.0.960912",
|
||||||
"extract-zip": "2.0.1",
|
"extract-zip": "2.0.1",
|
||||||
"https-proxy-agent": "5.0.0",
|
"https-proxy-agent": "5.0.0",
|
||||||
"node-fetch": "2.6.7",
|
|
||||||
"pkg-dir": "4.2.0",
|
"pkg-dir": "4.2.0",
|
||||||
"progress": "2.0.3",
|
"progress": "2.0.3",
|
||||||
"proxy-from-env": "1.1.0",
|
"proxy-from-env": "1.1.0",
|
||||||
"rimraf": "3.0.2",
|
"rimraf": "3.0.2",
|
||||||
"tar-fs": "2.1.1",
|
"tar-fs": "2.1.1",
|
||||||
"unbzip2-stream": "1.4.3",
|
"unbzip2-stream": "1.4.3",
|
||||||
"ws": "8.2.3"
|
"ws": "8.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "13.2.0",
|
"@commitlint/cli": "16.1.0",
|
||||||
"@commitlint/config-conventional": "16.0.0",
|
"@commitlint/config-conventional": "16.0.0",
|
||||||
"@microsoft/api-documenter": "7.13.65",
|
"@microsoft/api-documenter": "7.15.1",
|
||||||
"@microsoft/api-extractor": "7.18.15",
|
"@microsoft/api-extractor": "7.19.4",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
"@types/mime": "2.0.3",
|
"@types/mime": "2.0.3",
|
||||||
"@types/mocha": "9.0.0",
|
"@types/mocha": "9.1.0",
|
||||||
"@types/node": "17.0.15",
|
"@types/node": "17.0.16",
|
||||||
"@types/progress": "2.0.5",
|
"@types/progress": "2.0.5",
|
||||||
"@types/proxy-from-env": "1.0.1",
|
"@types/proxy-from-env": "1.0.1",
|
||||||
"@types/rimraf": "3.0.2",
|
"@types/rimraf": "3.0.2",
|
||||||
"@types/sinon": "10.0.4",
|
"@types/sinon": "10.0.11",
|
||||||
"@types/tar-fs": "2.0.1",
|
"@types/tar-fs": "2.0.1",
|
||||||
"@types/ws": "8.2.0",
|
"@types/ws": "8.2.2",
|
||||||
"@typescript-eslint/eslint-plugin": "4.23.0",
|
"@typescript-eslint/eslint-plugin": "5.11.0",
|
||||||
"@typescript-eslint/parser": "4.33.0",
|
"@typescript-eslint/parser": "5.11.0",
|
||||||
"@web/test-runner": "0.13.18",
|
"@web/test-runner": "0.13.27",
|
||||||
"commonmark": "0.29.3",
|
"commonmark": "0.30.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"eslint": "7.32.0",
|
"eslint": "8.8.0",
|
||||||
"eslint-config-prettier": "8.3.0",
|
"eslint-config-prettier": "8.3.0",
|
||||||
"eslint-plugin-import": "2.22.1",
|
"eslint-plugin-import": "2.25.4",
|
||||||
"eslint-plugin-mocha": "9.0.0",
|
"eslint-plugin-mocha": "10.0.3",
|
||||||
"eslint-plugin-prettier": "4.0.0",
|
"eslint-plugin-prettier": "4.0.0",
|
||||||
"eslint-plugin-unicorn": "37.0.1",
|
"eslint-plugin-unicorn": "40.1.0",
|
||||||
"esprima": "4.0.1",
|
"esprima": "4.0.1",
|
||||||
"expect": "25.2.7",
|
"expect": "25.2.7",
|
||||||
"husky": "7.0.2",
|
"husky": "7.0.4",
|
||||||
"jpeg-js": "0.4.3",
|
"jpeg-js": "0.4.3",
|
||||||
"mime": "2.5.2",
|
"mime": "3.0.0",
|
||||||
"minimist": "1.2.5",
|
"minimist": "1.2.5",
|
||||||
"mocha": "9.1.3",
|
"mocha": "9.2.0",
|
||||||
"ncp": "2.0.0",
|
"ncp": "2.0.0",
|
||||||
"pixelmatch": "5.2.1",
|
"pixelmatch": "5.2.1",
|
||||||
"pngjs": "6.0.0",
|
"pngjs": "6.0.0",
|
||||||
"prettier": "2.3.0",
|
"prettier": "2.5.1",
|
||||||
"sinon": "9.2.4",
|
"sinon": "13.0.1",
|
||||||
"source-map-support": "0.5.19",
|
"source-map-support": "0.5.21",
|
||||||
"standard-version": "9.3.2",
|
"standard-version": "9.3.2",
|
||||||
"text-diff": "1.0.1",
|
"text-diff": "1.0.1",
|
||||||
"ts-node": "10.4.0",
|
"ts-node": "10.5.0",
|
||||||
"typescript": "4.4.4"
|
"typescript": "4.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,9 @@ import { Browser, TargetFilterCallback } from './Browser.js';
|
|||||||
import { assert } from './assert.js';
|
import { assert } from './assert.js';
|
||||||
import { debugError } from '../common/helper.js';
|
import { debugError } from '../common/helper.js';
|
||||||
import { Connection } from './Connection.js';
|
import { Connection } from './Connection.js';
|
||||||
import { getFetch } from './fetch.js';
|
|
||||||
import { Viewport } from './PuppeteerViewport.js';
|
import { Viewport } from './PuppeteerViewport.js';
|
||||||
import { isNode } from '../environment.js';
|
import { isNode } from '../environment.js';
|
||||||
|
import { getFetch } from './fetch.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic browser options that can be passed when launching any browser or when
|
* Generic browser options that can be passed when launching any browser or when
|
||||||
|
@ -273,12 +273,7 @@ export class JSCoverage {
|
|||||||
assert(this._enabled, 'JSCoverage is not enabled');
|
assert(this._enabled, 'JSCoverage is not enabled');
|
||||||
this._enabled = false;
|
this._enabled = false;
|
||||||
|
|
||||||
const result = await Promise.all<
|
const result = await Promise.all([
|
||||||
Protocol.Profiler.TakePreciseCoverageResponse,
|
|
||||||
void,
|
|
||||||
void,
|
|
||||||
void
|
|
||||||
>([
|
|
||||||
this._client.send('Profiler.takePreciseCoverage'),
|
this._client.send('Profiler.takePreciseCoverage'),
|
||||||
this._client.send('Profiler.stopPreciseCoverage'),
|
this._client.send('Profiler.stopPreciseCoverage'),
|
||||||
this._client.send('Profiler.disable'),
|
this._client.send('Profiler.disable'),
|
||||||
|
@ -133,7 +133,7 @@ export class ExecutionContext {
|
|||||||
*
|
*
|
||||||
* @returns A promise that resolves to the return value of the given function.
|
* @returns A promise that resolves to the return value of the given function.
|
||||||
*/
|
*/
|
||||||
async evaluate<ReturnType extends any>(
|
async evaluate<ReturnType>(
|
||||||
pageFunction: Function | string,
|
pageFunction: Function | string,
|
||||||
...args: unknown[]
|
...args: unknown[]
|
||||||
): Promise<ReturnType> {
|
): Promise<ReturnType> {
|
||||||
|
@ -1795,7 +1795,7 @@ export class Page extends EventEmitter {
|
|||||||
* more than 2 network connections for at least `500` ms.
|
* more than 2 network connections for at least `500` ms.
|
||||||
*/
|
*/
|
||||||
async reload(options?: WaitForOptions): Promise<HTTPResponse | null> {
|
async reload(options?: WaitForOptions): Promise<HTTPResponse | null> {
|
||||||
const result = await Promise.all<HTTPResponse, void>([
|
const result = await Promise.all([
|
||||||
this.waitForNavigation(options),
|
this.waitForNavigation(options),
|
||||||
this._client.send('Page.reload'),
|
this._client.send('Page.reload'),
|
||||||
]);
|
]);
|
||||||
|
@ -138,7 +138,7 @@ export class WebWorker extends EventEmitter {
|
|||||||
* @param args - Arguments to pass to `pageFunction`.
|
* @param args - Arguments to pass to `pageFunction`.
|
||||||
* @returns Promise which resolves to the return value of `pageFunction`.
|
* @returns Promise which resolves to the return value of `pageFunction`.
|
||||||
*/
|
*/
|
||||||
async evaluate<ReturnType extends any>(
|
async evaluate<ReturnType>(
|
||||||
pageFunction: Function | string,
|
pageFunction: Function | string,
|
||||||
...args: any[]
|
...args: any[]
|
||||||
): Promise<ReturnType> {
|
): Promise<ReturnType> {
|
||||||
|
@ -18,5 +18,5 @@ import { isNode } from '../environment.js';
|
|||||||
|
|
||||||
/* Use the global version if we're in the browser, else load the node-fetch module. */
|
/* Use the global version if we're in the browser, else load the node-fetch module. */
|
||||||
export const getFetch = async (): Promise<typeof fetch> => {
|
export const getFetch = async (): Promise<typeof fetch> => {
|
||||||
return isNode ? await import('node-fetch') : globalThis.fetch;
|
return isNode ? (await import('cross-fetch')).fetch : globalThis.fetch;
|
||||||
};
|
};
|
||||||
|
@ -127,7 +127,7 @@ function isNumber(obj: unknown): obj is number {
|
|||||||
return typeof obj === 'number' || obj instanceof Number;
|
return typeof obj === 'number' || obj instanceof Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function waitForEvent<T extends any>(
|
async function waitForEvent<T>(
|
||||||
emitter: CommonEventEmitter,
|
emitter: CommonEventEmitter,
|
||||||
eventName: string | symbol,
|
eventName: string | symbol,
|
||||||
predicate: (event: T) => Promise<boolean> | boolean,
|
predicate: (event: T) => Promise<boolean> | boolean,
|
||||||
@ -295,7 +295,7 @@ function makePredicateString(
|
|||||||
})() `;
|
})() `;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function waitWithTimeout<T extends any>(
|
async function waitWithTimeout<T>(
|
||||||
promise: Promise<T>,
|
promise: Promise<T>,
|
||||||
taskName: string,
|
taskName: string,
|
||||||
timeout: number
|
timeout: number
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2022 Google Inc. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
declare const puppeteerDirname: string;
|
declare const puppeteerDirname: string;
|
||||||
|
|
||||||
export { puppeteerDirname };
|
export { puppeteerDirname };
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
import { PuppeteerNode } from './node/Puppeteer.js';
|
import { PuppeteerNode } from './node/Puppeteer.js';
|
||||||
import { PUPPETEER_REVISIONS } from './revisions.js';
|
import { PUPPETEER_REVISIONS } from './revisions.js';
|
||||||
import pkgDir from 'pkg-dir';
|
import { sync } from 'pkg-dir';
|
||||||
import { Product } from './common/Product.js';
|
import { Product } from './common/Product.js';
|
||||||
import { puppeteerDirname } from './compat.js';
|
import { puppeteerDirname } from './compat.js';
|
||||||
|
|
||||||
export const initializePuppeteerNode = (packageName: string): PuppeteerNode => {
|
export const initializePuppeteerNode = (packageName: string): PuppeteerNode => {
|
||||||
const puppeteerRootDirectory = pkgDir.sync(puppeteerDirname);
|
const puppeteerRootDirectory = sync(puppeteerDirname);
|
||||||
|
|
||||||
let preferredRevision = PUPPETEER_REVISIONS.chromium;
|
let preferredRevision = PUPPETEER_REVISIONS.chromium;
|
||||||
const isPuppeteerCore = packageName === 'puppeteer-core';
|
const isPuppeteerCore = packageName === 'puppeteer-core';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const { describe, it } = require('mocha');
|
const { describe, it } = require('mocha');
|
||||||
const { getCoverageResults } = require('./coverage-utils');
|
const { getCoverageResults } = require('./coverage-utils.js');
|
||||||
const expect = require('expect');
|
const expect = require('expect');
|
||||||
|
|
||||||
describe('API coverage test', () => {
|
describe('API coverage test', () => {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { TestServer } = require('../utils/testserver/');
|
const { TestServer } = require('../utils/testserver/index.js');
|
||||||
|
|
||||||
const port = 8907;
|
const port = 8907;
|
||||||
const httpsPort = 8908;
|
const httpsPort = 8908;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const expect = require('expect');
|
const expect = require('expect');
|
||||||
const GoldenUtils = require('./golden-utils');
|
const GoldenUtils = require('./golden-utils.js');
|
||||||
const PROJECT_ROOT = fs.existsSync(path.join(__dirname, '..', 'package.json'))
|
const PROJECT_ROOT = fs.existsSync(path.join(__dirname, '..', 'package.json'))
|
||||||
? path.join(__dirname, '..')
|
? path.join(__dirname, '..')
|
||||||
: path.join(__dirname, '..', '..');
|
: path.join(__dirname, '..', '..');
|
||||||
|
@ -172,7 +172,7 @@ async function checkRollCandidate(channel) {
|
|||||||
10
|
10
|
||||||
);
|
);
|
||||||
const currentRevision = parseInt(
|
const currentRevision = parseInt(
|
||||||
require('../lib/cjs/puppeteer/revisions').PUPPETEER_REVISIONS.chromium,
|
require('../lib/cjs/puppeteer/revisions.js').PUPPETEER_REVISIONS.chromium,
|
||||||
10
|
10
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const ts = require('typescript');
|
const ts = require('typescript');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Documentation = require('./Documentation');
|
const Documentation = require('./Documentation.js');
|
||||||
module.exports = checkSources;
|
module.exports = checkSources;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Documentation = require('./Documentation');
|
const Documentation = require('./Documentation.js');
|
||||||
const commonmark = require('commonmark');
|
const { Parser, HtmlRenderer } = require('commonmark');
|
||||||
|
|
||||||
class MDOutline {
|
class MDOutline {
|
||||||
/**
|
/**
|
||||||
@ -25,9 +25,9 @@ class MDOutline {
|
|||||||
*/
|
*/
|
||||||
static async create(page, text) {
|
static async create(page, text) {
|
||||||
// Render markdown as HTML.
|
// Render markdown as HTML.
|
||||||
const reader = new commonmark.Parser();
|
const reader = new Parser();
|
||||||
const parsed = reader.parse(text);
|
const parsed = reader.parse(text);
|
||||||
const writer = new commonmark.HtmlRenderer();
|
const writer = new HtmlRenderer();
|
||||||
const html = writer.render(parsed);
|
const html = writer.render(parsed);
|
||||||
|
|
||||||
page.on('console', (msg) => {
|
page.on('console', (msg) => {
|
||||||
|
@ -14,13 +14,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const jsBuilder = require('./JSBuilder');
|
const jsBuilder = require('./JSBuilder.js');
|
||||||
const mdBuilder = require('./MDBuilder');
|
const mdBuilder = require('./MDBuilder.js');
|
||||||
const Documentation = require('./Documentation');
|
const Documentation = require('./Documentation.js');
|
||||||
const Message = require('../Message');
|
const Message = require('../Message.js');
|
||||||
const {
|
const {
|
||||||
MODULES_TO_CHECK_FOR_COVERAGE,
|
MODULES_TO_CHECK_FOR_COVERAGE,
|
||||||
} = require('../../../test/coverage-utils');
|
} = require('../../../test/coverage-utils.js');
|
||||||
|
|
||||||
const EXCLUDE_PROPERTIES = new Set([
|
const EXCLUDE_PROPERTIES = new Set([
|
||||||
'Browser.create',
|
'Browser.create',
|
||||||
|
@ -15,9 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/extensions
|
||||||
const puppeteer = require('../..');
|
const puppeteer = require('../..');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Source = require('./Source');
|
const Source = require('./Source.js');
|
||||||
|
|
||||||
const PROJECT_DIR = path.join(__dirname, '..', '..');
|
const PROJECT_DIR = path.join(__dirname, '..', '..');
|
||||||
const VERSION = require(path.join(PROJECT_DIR, 'package.json')).version;
|
const VERSION = require(path.join(PROJECT_DIR, 'package.json')).version;
|
||||||
@ -58,7 +59,7 @@ async function run() {
|
|||||||
);
|
);
|
||||||
const mdSources = [readme, api, troubleshooting, contributing];
|
const mdSources = [readme, api, troubleshooting, contributing];
|
||||||
|
|
||||||
const preprocessor = require('./preprocessor');
|
const preprocessor = require('./preprocessor/index.js');
|
||||||
messages.push(...(await preprocessor.runCommands(mdSources, VERSION)));
|
messages.push(...(await preprocessor.runCommands(mdSources, VERSION)));
|
||||||
messages.push(
|
messages.push(
|
||||||
...(await preprocessor.ensureReleasedAPILinks([readme], VERSION))
|
...(await preprocessor.ensureReleasedAPILinks([readme], VERSION))
|
||||||
@ -66,7 +67,7 @@ async function run() {
|
|||||||
|
|
||||||
const browser = await puppeteer.launch();
|
const browser = await puppeteer.launch();
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
const checkPublicAPI = require('./check_public_api');
|
const checkPublicAPI = require('./check_public_api/index.js');
|
||||||
const tsSources = [
|
const tsSources = [
|
||||||
/* Source.readdir doesn't deal with nested directories well.
|
/* Source.readdir doesn't deal with nested directories well.
|
||||||
* Rather than invest time here when we're going to remove this Doc tooling soon
|
* Rather than invest time here when we're going to remove this Doc tooling soon
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Message = require('../Message');
|
const Message = require('../Message.js');
|
||||||
|
|
||||||
const IS_RELEASE = Boolean(process.env.IS_RELEASE);
|
const IS_RELEASE = Boolean(process.env.IS_RELEASE);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const { runCommands, ensureReleasedAPILinks } = require('.');
|
const { runCommands, ensureReleasedAPILinks } = require('.');
|
||||||
const Source = require('../Source');
|
const Source = require('../Source.js');
|
||||||
const expect = require('expect');
|
const expect = require('expect');
|
||||||
|
|
||||||
describe('doclint preprocessor specs', function () {
|
describe('doclint preprocessor specs', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user