Skip to content

Commit a187c23

Browse files
committed
chore: export coreBundle
1 parent c0cc980 commit a187c23

119 files changed

Lines changed: 888 additions & 839 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/playwright-browser-chromium/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
let install;
1818

1919
try {
20-
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
21-
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
20+
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
21+
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
2222
} catch (e) {
2323
// Dev build, don't install browsers by default.
2424
}

packages/playwright-browser-firefox/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
let install;
1818

1919
try {
20-
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
21-
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
20+
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
21+
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
2222
} catch (e) {
2323
// Dev build, don't install browsers by default.
2424
}

packages/playwright-browser-webkit/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
let install;
1818

1919
try {
20-
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
21-
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
20+
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
21+
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
2222
} catch (e) {
2323
// Dev build, don't install browsers by default.
2424
}

packages/playwright-chromium/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
* limitations under the License.
1616
*/
1717

18-
const { program } = require('playwright-core/lib/cli/program');
18+
const { program } = require('playwright-core/lib/coreBundle').libCli;
1919
program.parse(process.argv);

packages/playwright-chromium/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
let install;
1818

1919
try {
20-
if (!require('playwright-core/lib/utils').isLikelyNpxGlobal())
21-
install = require('playwright-core/lib/server').installBrowsersForNpmInstall;
20+
if (!require('playwright-core/lib/coreBundle').serverUtils.isLikelyNpxGlobal())
21+
install = require('playwright-core/lib/coreBundle').sever.installBrowsersForNpmInstall;
2222
} catch (e) {
2323
// Dev build, don't install browsers by default.
2424
}

packages/playwright-cli-stub/playwright-cli-stub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

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

2020
program().catch(e => {
2121
console.error(e.message);

packages/playwright-core/cli.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
const { program } = require('./lib/cli/programWithTestStub');
17+
const { libCli, libCliTestStub } = require('./lib/coreBundle');
18+
const { program } = require('./lib/utilsBundle');
19+
libCli.decorateProgram(program);
20+
libCliTestStub.decorateProgram(program);
1821
program.parse(process.argv);

packages/playwright-core/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ if (major < minimumMajorNodeVersion) {
2929
process.exit(1);
3030
}
3131

32-
module.exports = require('./lib/inprocess');
32+
module.exports = require('./lib/coreBundle').inprocess.playwright;

packages/playwright-core/package.json

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,11 @@
2323
},
2424
"./package.json": "./package.json",
2525
"./lib/bootstrap": "./lib/bootstrap.js",
26-
"./lib/outofprocess": "./lib/outofprocess.js",
27-
"./lib/cli/program": "./lib/cli/program.js",
28-
"./lib/tools/cli-client/program": "./lib/tools/cli-client/program.js",
29-
"./lib/tools/mcp/program": "./lib/tools/mcp/program.js",
26+
"./lib/coreBundle": "./lib/coreBundle.js",
3027
"./lib/mcpBundle": "./lib/mcpBundle.js",
31-
"./lib/zodBundle": "./lib/zodBundle.js",
32-
"./lib/tools/exports": "./lib/tools/exports.js",
33-
"./lib/remote/playwrightServer": "./lib/remote/playwrightServer.js",
34-
"./lib/server": "./lib/server/index.js",
35-
"./lib/server/utils/image_tools/stats": "./lib/server/utils/image_tools/stats.js",
36-
"./lib/server/utils/image_tools/compare": "./lib/server/utils/image_tools/compare.js",
37-
"./lib/server/utils/image_tools/imageChannel": "./lib/server/utils/image_tools/imageChannel.js",
38-
"./lib/server/utils/image_tools/colorUtils": "./lib/server/utils/image_tools/colorUtils.js",
39-
"./lib/server/registry/index": "./lib/server/registry/index.js",
40-
"./lib/utils": "./lib/utils.js",
4128
"./lib/utilsBundle": "./lib/utilsBundle.js",
42-
"./lib/zipBundle": "./lib/zipBundle.js"
29+
"./lib/zipBundle": "./lib/zipBundle.js",
30+
"./lib/zodBundle": "./lib/zodBundle.js"
4331
},
4432
"bin": {
4533
"playwright-core": "cli.js"

packages/playwright-core/src/DEPS.list

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ utilsBundle.ts
1818
**
1919

2020
[inprocess.ts]
21-
utils/
22-
server/utils
21+
**
2322

2423
[outofprocess.ts]
2524
client/
@@ -28,5 +27,9 @@ utils/
2827
utils/isomorphic
2928
server/utils
3029

30+
[package.ts]
31+
"strict"
32+
3133
[serverRegistry.ts]
3234
"strict"
35+
package.ts

0 commit comments

Comments
 (0)