Skip to content

Commit bc9f9b7

Browse files
committed
cherry-pick(#23203): chore: fix playwright-core cli
1 parent 4aee014 commit bc9f9b7

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

packages/playwright-core/cli.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Copyright (c) Microsoft Corporation.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
module.exports = require('playwright-core/lib/cli/cli');

packages/playwright-core/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,8 @@
3535
"./types/protocol": "./types/protocol.d.ts",
3636
"./types/structs": "./types/structs.d.ts"
3737
},
38+
"bin": {
39+
"playwright": "./cli.js"
40+
},
3841
"types": "types/types.d.ts"
3942
}

packages/playwright-ct-core/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
module.exports = require('@playwright/test/cli');
17+
module.exports = require('@playwright/test/lib/cli');

packages/playwright-test/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
module.exports = require('./lib/cli');
17+
module.exports = require('@playwright/test/lib/cli');

packages/playwright-test/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"require": "./index.js",
1616
"default": "./index.js"
1717
},
18-
"./cli": "./cli.js",
1918
"./package.json": "./package.json",
2019
"./lib/cli": "./lib/cli.js",
2120
"./lib/common/babelBundle": "./lib/common/babelBundle.js",

0 commit comments

Comments
 (0)