Skip to content

Commit

Permalink
feat: change vendor package exports (#818)
Browse files Browse the repository at this point in the history
* feat: change vendor package exports

This patch changes top-level exports for the vendor-specific
packages:
- `playwright-chromium`: now exports an object with a single `chromium`
field
- `playwright-wekbit`: now exports an object with a single `webkit`
- `playwright-firefox`: now exports an object with a single `firefox`

Fixes #814

* fix typo

* address comments
  • Loading branch information
aslushnikov authored Feb 3, 2020
1 parent 8028fb0 commit cea036a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion packages/playwright-chromium/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = require('playwright-core').chromium;

module.exports = {
...require('playwright-core'),
// Keep exporting Chromium and nullify other browsers.
webkit: undefined,
firefox: undefined,
}
8 changes: 7 additions & 1 deletion packages/playwright-firefox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = require('playwright-core').firefox;

module.exports = {
...require('playwright-core'),
// Keep exporting firefox and nullify other browsers.
chromium: undefined,
webkit: undefined,
}
8 changes: 7 additions & 1 deletion packages/playwright-webkit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = require('playwright-core').webkit;

module.exports = {
...require('playwright-core'),
// Keep exporting webkit and nullify other browsers.
chromium: undefined,
firefox: undefined,
}

0 comments on commit cea036a

Please sign in to comment.