Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create node directory for Node-only files #6041

Merged
merged 1 commit into from Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Browser.ts
Expand Up @@ -54,7 +54,6 @@ export class Browser extends EventEmitter {
_closeCallback: BrowserCloseCallback;
_defaultContext: BrowserContext;
_contexts: Map<string, BrowserContext>;
// TODO: once Target is in TypeScript we can type this properly.
_targets: Map<string, Target>;

constructor(
Expand Down
8 changes: 4 additions & 4 deletions src/Puppeteer.ts
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Launcher from './Launcher';
import Launcher from './node/Launcher';
import {
LaunchOptions,
ChromeArgOptions,
BrowserOptions,
} from './launcher/LaunchOptions';
import { ProductLauncher } from './Launcher';
import { BrowserFetcher, BrowserFetcherOptions } from './BrowserFetcher';
} from './node/LaunchOptions';
import { ProductLauncher } from './node/Launcher';
import { BrowserFetcher, BrowserFetcherOptions } from './node/BrowserFetcher';
import { puppeteerErrors, PuppeteerErrors } from './Errors';
import { ConnectionTransport } from './ConnectionTransport';

Expand Down
2 changes: 1 addition & 1 deletion src/api-docs-entry.ts
Expand Up @@ -25,7 +25,7 @@
*/
export * from './Accessibility';
export * from './Browser';
export * from './BrowserFetcher';
export * from './node/BrowserFetcher';
export * from './Connection';
export * from './ConsoleMessage';
export * from './Coverage';
Expand Down
2 changes: 1 addition & 1 deletion src/api.ts
Expand Up @@ -22,7 +22,7 @@ module.exports = {
Accessibility: require('./Accessibility').Accessibility,
Browser: require('./Browser').Browser,
BrowserContext: require('./Browser').BrowserContext,
BrowserFetcher: require('./BrowserFetcher').BrowserFetcher,
BrowserFetcher: require('./node/BrowserFetcher').BrowserFetcher,
CDPSession: require('./Connection').CDPSession,
ConsoleMessage: require('./ConsoleMessage').ConsoleMessage,
Coverage: require('./Coverage').Coverage,
Expand Down
6 changes: 3 additions & 3 deletions src/BrowserFetcher.ts → src/node/BrowserFetcher.ts
Expand Up @@ -23,13 +23,13 @@ import * as https from 'https';
import * as http from 'http';

import extractZip from 'extract-zip';
import { debug } from './Debug';
import { debug } from '../Debug';
import removeRecursive from 'rimraf';
import * as URL from 'url';
import ProxyAgent from 'https-proxy-agent';
import { getProxyForUrl } from 'proxy-from-env';
import { assert } from './assert';
import { helper } from './helper';
import { assert } from '../assert';
import { helper } from '../helper';
const debugFetcher = debug(`puppeteer:fetcher`);

const downloadURLs = {
Expand Down
Expand Up @@ -23,7 +23,7 @@ import { helper, debugError } from '../helper';
import { LaunchOptions } from './LaunchOptions';
import { Connection } from '../Connection';
import { WebSocketTransport } from '../WebSocketTransport';
import { PipeTransport } from '../PipeTransport';
import { PipeTransport } from './PipeTransport';
import * as readline from 'readline';
import { TimeoutError } from '../Errors';

Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions src/Launcher.ts → src/node/Launcher.ts
Expand Up @@ -21,13 +21,13 @@ import * as URL from 'url';
import * as fs from 'fs';

import { BrowserFetcher } from './BrowserFetcher';
import { Connection } from './Connection';
import { Browser } from './Browser';
import { assert } from './assert';
import { helper, debugError } from './helper';
import { ConnectionTransport } from './ConnectionTransport';
import { WebSocketTransport } from './WebSocketTransport';
import { BrowserRunner } from './launcher/BrowserRunner';
import { Connection } from '../Connection';
import { Browser } from '../Browser';
import { assert } from '../assert';
import { helper, debugError } from '../helper';
import { ConnectionTransport } from '../ConnectionTransport';
import { WebSocketTransport } from '../WebSocketTransport';
import { BrowserRunner } from './BrowserRunner';

const mkdtempAsync = helper.promisify(fs.mkdtemp);
const writeFileAsync = helper.promisify(fs.writeFile);
Expand All @@ -36,7 +36,7 @@ import {
ChromeArgOptions,
LaunchOptions,
BrowserOptions,
} from './launcher/LaunchOptions';
} from './LaunchOptions';

export interface ProductLauncher {
launch(object);
Expand Down
4 changes: 2 additions & 2 deletions src/PipeTransport.ts → src/node/PipeTransport.ts
Expand Up @@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { helper, debugError, PuppeteerEventListener } from './helper';
import { ConnectionTransport } from './ConnectionTransport';
import { helper, debugError, PuppeteerEventListener } from '../helper';
import { ConnectionTransport } from '../ConnectionTransport';

export class PipeTransport implements ConnectionTransport {
_pipeWrite: NodeJS.WritableStream;
Expand Down
2 changes: 1 addition & 1 deletion utils/doclint/cli.js
Expand Up @@ -61,7 +61,7 @@ async function run() {
* we'll just list the directories manually.
*/
...(await Source.readdir(path.join(PROJECT_DIR, 'src'), 'ts')),
...(await Source.readdir(path.join(PROJECT_DIR, 'src', 'launcher'), 'ts')),
...(await Source.readdir(path.join(PROJECT_DIR, 'src', 'node'), 'ts')),
];

const tsSourcesNoDefinitions = tsSources.filter(
Expand Down