chore: rename root index-for-dev.js into index.js (#2337)
This commit is contained in:
parent
79ec3c916e
commit
43eed027bd
|
|
@ -33,7 +33,7 @@ class Wrapper {
|
||||||
logger: undefined,
|
logger: undefined,
|
||||||
};
|
};
|
||||||
const options = {
|
const options = {
|
||||||
playwrightFile: path.join(state.playwrightPath, 'index-for-dev'),
|
playwrightFile: path.join(state.playwrightPath, 'index'),
|
||||||
browserTypeName: state.browserType.name(),
|
browserTypeName: state.browserType.name(),
|
||||||
launchOptions,
|
launchOptions,
|
||||||
...extraOptions,
|
...extraOptions,
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ function collect(browserNames) {
|
||||||
|
|
||||||
// TODO: this should be a preinstalled playwright by default.
|
// TODO: this should be a preinstalled playwright by default.
|
||||||
const playwrightPath = config.playwrightPath;
|
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'));
|
const { setUnderTest } = require(require('path').join(playwrightPath, 'lib/helper.js'));
|
||||||
setUnderTest();
|
setUnderTest();
|
||||||
|
|
||||||
|
|
|
||||||
14
test/types.d.ts
vendored
14
test/types.d.ts
vendored
|
|
@ -48,8 +48,8 @@ interface TestSetup<STATE> {
|
||||||
MAC: boolean;
|
MAC: boolean;
|
||||||
LINUX: boolean;
|
LINUX: boolean;
|
||||||
WIN: boolean;
|
WIN: boolean;
|
||||||
playwright: typeof import('../index-for-dev');
|
playwright: typeof import('../index');
|
||||||
browserType: import('../index-for-dev').BrowserType<import('../index-for-dev').Browser>;
|
browserType: import('../index').BrowserType<import('../index').Browser>;
|
||||||
selectors: import('../src/selectors').Selectors;
|
selectors: import('../src/selectors').Selectors;
|
||||||
expect<T>(value: T): Expect<T>;
|
expect<T>(value: T): Expect<T>;
|
||||||
defaultBrowserOptions: import('../src/server/browserType').LaunchOptions;
|
defaultBrowserOptions: import('../src/server/browserType').LaunchOptions;
|
||||||
|
|
@ -65,16 +65,16 @@ type TestState = {
|
||||||
};
|
};
|
||||||
|
|
||||||
type BrowserState = TestState & {
|
type BrowserState = TestState & {
|
||||||
browser: import('../index-for-dev').Browser;
|
browser: import('../index').Browser;
|
||||||
browserServer: import('../index-for-dev').BrowserServer;
|
browserServer: import('../index').BrowserServer;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PageState = BrowserState & {
|
type PageState = BrowserState & {
|
||||||
context: import('../index-for-dev').BrowserContext;
|
context: import('../index').BrowserContext;
|
||||||
page: import('../index-for-dev').Page;
|
page: import('../index').Page;
|
||||||
};
|
};
|
||||||
type ChromiumPageState = PageState & {
|
type ChromiumPageState = PageState & {
|
||||||
browser: import('../index-for-dev').ChromiumBrowser;
|
browser: import('../index').ChromiumBrowser;
|
||||||
};
|
};
|
||||||
type TestSuite = (setup: TestSetup<TestState>) => void;
|
type TestSuite = (setup: TestSetup<TestState>) => void;
|
||||||
type BrowserTestSuite = (setup: TestSetup<BrowserState>) => void;
|
type BrowserTestSuite = (setup: TestSetup<BrowserState>) => void;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const playwright = require('../../../../index-for-dev');
|
const playwright = require('../../../../');
|
||||||
const checkPublicAPI = require('..');
|
const checkPublicAPI = require('..');
|
||||||
const Source = require('../../Source');
|
const Source = require('../../Source');
|
||||||
const mdBuilder = require('../MDBuilder');
|
const mdBuilder = require('../MDBuilder');
|
||||||
|
|
@ -119,4 +119,4 @@ function serializeType(type) {
|
||||||
name: type.name,
|
name: type.name,
|
||||||
properties: type.properties.length ? type.properties.map(serializeMember) : undefined
|
properties: type.properties.length ? type.properties.map(serializeMember) : undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const playwright = require('../../index-for-dev');
|
const playwright = require('../../');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Source = require('./Source');
|
const Source = require('./Source');
|
||||||
const Message = require('./Message');
|
const Message = require('./Message');
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
//@ts-check
|
//@ts-check
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const Source = require('../doclint/Source');
|
const Source = require('../doclint/Source');
|
||||||
const {chromium} = require('../../index-for-dev');
|
const {chromium} = require('../..');
|
||||||
const Documentation = require('../doclint/check_public_api/Documentation');
|
const Documentation = require('../doclint/check_public_api/Documentation');
|
||||||
const PROJECT_DIR = path.join(__dirname, '..', '..');
|
const PROJECT_DIR = path.join(__dirname, '..', '..');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
@ -404,4 +404,4 @@ function mergeClasses(mdClass, jsClass) {
|
||||||
for (const member of mdClass.membersArray)
|
for (const member of mdClass.membersArray)
|
||||||
member.templates = jsClass.members.get(member.name).templates;
|
member.templates = jsClass.members.get(member.name).templates;
|
||||||
return mdClass;
|
return mdClass;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const pw = require('../index-for-dev.js');
|
const pw = require('..');
|
||||||
const child_process = require('child_process');
|
const child_process = require('child_process');
|
||||||
|
|
||||||
for (const browserType of [pw.chromium, pw.firefox]) {
|
for (const browserType of [pw.chromium, pw.firefox]) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ async function generateProtocol(name, executablePath) {
|
||||||
|
|
||||||
async function generateChromiumProtocol(executablePath) {
|
async function generateChromiumProtocol(executablePath) {
|
||||||
const outputPath = path.join(__dirname, '..', '..', 'src', 'chromium', 'protocol.ts');
|
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);
|
const defaultArgs = playwright._defaultArgs.bind(playwright);
|
||||||
playwright._defaultArgs = (...args) => {
|
playwright._defaultArgs = (...args) => {
|
||||||
const result = defaultArgs(...args);
|
const result = defaultArgs(...args);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue