Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/playwright-browser-chromium/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
let install;

try {
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
} catch (e) {
// Dev build, don't install browsers by default.
}
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-browser-firefox/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
let install;

try {
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
} catch (e) {
// Dev build, don't install browsers by default.
}
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-browser-webkit/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
let install;

try {
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
} catch (e) {
// Dev build, don't install browsers by default.
}
Expand Down
4 changes: 3 additions & 1 deletion packages/playwright-chromium/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
* limitations under the License.
*/

const { program } = require('playwright-core/lib/cli/program');
const { program } = require('playwright-core/lib/utilsBundle');
const { libCli } = require('playwright-core/lib/coreBundle');
libCli.decorateProgram(program);
program.parse(process.argv);
4 changes: 2 additions & 2 deletions packages/playwright-chromium/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
let install;

try {
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
} catch (e) {
// Dev build, don't install browsers by default.
}
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-cli-stub/playwright-cli-stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

const { program } = require('playwright-core/lib/tools/cli-client/program');
const { program } = require('playwright-core/lib/coreBundle').cli;

program().catch(e => {
console.error(e.message);
Expand Down
5 changes: 4 additions & 1 deletion packages/playwright-core/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const { program } = require('./lib/cli/programWithTestStub');
const { libCli, libCliTestStub } = require('./lib/coreBundle');
const { program } = require('./lib/utilsBundle');
libCli.decorateProgram(program);
libCliTestStub.decorateProgram(program);
program.parse(process.argv);
2 changes: 1 addition & 1 deletion packages/playwright-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ if (major < minimumMajorNodeVersion) {
process.exit(1);
}

module.exports = require('./lib/inprocess');
module.exports = require('./lib/coreBundle').inprocess.playwright;
18 changes: 3 additions & 15 deletions packages/playwright-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,11 @@
},
"./package.json": "./package.json",
"./lib/bootstrap": "./lib/bootstrap.js",
"./lib/outofprocess": "./lib/outofprocess.js",
"./lib/cli/program": "./lib/cli/program.js",
"./lib/tools/cli-client/program": "./lib/tools/cli-client/program.js",
"./lib/tools/mcp/program": "./lib/tools/mcp/program.js",
"./lib/coreBundle": "./lib/coreBundle.js",
"./lib/mcpBundle": "./lib/mcpBundle.js",
"./lib/zodBundle": "./lib/zodBundle.js",
"./lib/tools/exports": "./lib/tools/exports.js",
"./lib/remote/playwrightServer": "./lib/remote/playwrightServer.js",
"./lib/server": "./lib/server/index.js",
"./lib/server/utils/image_tools/stats": "./lib/server/utils/image_tools/stats.js",
"./lib/server/utils/image_tools/compare": "./lib/server/utils/image_tools/compare.js",
"./lib/server/utils/image_tools/imageChannel": "./lib/server/utils/image_tools/imageChannel.js",
"./lib/server/utils/image_tools/colorUtils": "./lib/server/utils/image_tools/colorUtils.js",
"./lib/server/registry/index": "./lib/server/registry/index.js",
"./lib/utils": "./lib/utils.js",
"./lib/utilsBundle": "./lib/utilsBundle.js",
"./lib/zipBundle": "./lib/zipBundle.js"
"./lib/zipBundle": "./lib/zipBundle.js",
"./lib/zodBundle": "./lib/zodBundle.js"
},
"bin": {
"playwright-core": "cli.js"
Expand Down
7 changes: 5 additions & 2 deletions packages/playwright-core/src/DEPS.list
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ utilsBundle.ts
**

[inprocess.ts]
utils/
server/utils
**

[outofprocess.ts]
client/
Expand All @@ -28,5 +27,9 @@ utils/
utils/isomorphic
server/utils

[package.ts]
"strict"

[serverRegistry.ts]
"strict"
package.ts
2 changes: 1 addition & 1 deletion packages/playwright-core/src/cli/DEPS.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[*]
../..
../inprocess.ts
../server/
../server/utils/
../remote/
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/cli/browserActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import fs from 'fs';
import os from 'os';
import path from 'path';

import * as playwright from '../..';
import { playwright } from '../inprocess';
import { gracefullyProcessExitDoNotHang, ManualPromise } from '../utils';
import { dotenv, program } from '../utilsBundle';

Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/cli/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import fs from 'fs';

import * as playwright from '../..';
import { playwright } from '../inprocess';
import { PipeTransport } from '../server/utils/pipeTransport';
import { PlaywrightServer } from '../remote/playwrightServer';
import { DispatcherConnection, PlaywrightDispatcher, RootDispatcher, createPlaywright } from '../server';
Expand Down
Loading
Loading