chore: rename root index-for-dev.js into index.js (#2337)

This commit is contained in:
Andrey Lushnikov 2020-05-23 00:03:57 -07:00 committed by GitHub
parent 79ec3c916e
commit 43eed027bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 16 additions and 16 deletions

View file

@ -33,7 +33,7 @@ class Wrapper {
logger: undefined,
};
const options = {
playwrightFile: path.join(state.playwrightPath, 'index-for-dev'),
playwrightFile: path.join(state.playwrightPath, 'index'),
browserTypeName: state.browserType.name(),
launchOptions,
...extraOptions,

View file

@ -74,7 +74,7 @@ function collect(browserNames) {
// TODO: this should be a preinstalled playwright by default.
const playwrightPath = config.playwrightPath;
const playwright = require(path.join(playwrightPath, 'index-for-dev'));
const playwright = require('..');
const { setUnderTest } = require(require('path').join(playwrightPath, 'lib/helper.js'));
setUnderTest();

14
test/types.d.ts vendored
View file

@ -48,8 +48,8 @@ interface TestSetup<STATE> {
MAC: boolean;
LINUX: boolean;
WIN: boolean;
playwright: typeof import('../index-for-dev');
browserType: import('../index-for-dev').BrowserType<import('../index-for-dev').Browser>;
playwright: typeof import('../index');
browserType: import('../index').BrowserType<import('../index').Browser>;
selectors: import('../src/selectors').Selectors;
expect<T>(value: T): Expect<T>;
defaultBrowserOptions: import('../src/server/browserType').LaunchOptions;
@ -65,16 +65,16 @@ type TestState = {
};
type BrowserState = TestState & {
browser: import('../index-for-dev').Browser;
browserServer: import('../index-for-dev').BrowserServer;
browser: import('../index').Browser;
browserServer: import('../index').BrowserServer;
};
type PageState = BrowserState & {
context: import('../index-for-dev').BrowserContext;
page: import('../index-for-dev').Page;
context: import('../index').BrowserContext;
page: import('../index').Page;
};
type ChromiumPageState = PageState & {
browser: import('../index-for-dev').ChromiumBrowser;
browser: import('../index').ChromiumBrowser;
};
type TestSuite = (setup: TestSetup<TestState>) => void;
type BrowserTestSuite = (setup: TestSetup<BrowserState>) => void;

View file

@ -15,7 +15,7 @@
*/
const path = require('path');
const playwright = require('../../../../index-for-dev');
const playwright = require('../../../../');
const checkPublicAPI = require('..');
const Source = require('../../Source');
const mdBuilder = require('../MDBuilder');

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
const playwright = require('../../index-for-dev');
const playwright = require('../../');
const path = require('path');
const Source = require('./Source');
const Message = require('./Message');

View file

@ -17,7 +17,7 @@
//@ts-check
const path = require('path');
const Source = require('../doclint/Source');
const {chromium} = require('../../index-for-dev');
const {chromium} = require('../..');
const Documentation = require('../doclint/check_public_api/Documentation');
const PROJECT_DIR = path.join(__dirname, '..', '..');
const fs = require('fs');

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
const pw = require('../index-for-dev.js');
const pw = require('..');
const child_process = require('child_process');
for (const browserType of [pw.chromium, pw.firefox]) {

View file

@ -17,7 +17,7 @@ async function generateProtocol(name, executablePath) {
async function generateChromiumProtocol(executablePath) {
const outputPath = path.join(__dirname, '..', '..', 'src', 'chromium', 'protocol.ts');
const playwright = await require('../../index-for-dev').chromium;
const playwright = require('../../index').chromium;
const defaultArgs = playwright._defaultArgs.bind(playwright);
playwright._defaultArgs = (...args) => {
const result = defaultArgs(...args);