feat: change vendor package exports (#818)

* 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
This commit is contained in:
Andrey Lushnikov 2020-02-03 14:24:03 -08:00 committed by GitHub
parent 8028fb052a
commit cea036ab7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -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,
}

View File

@ -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,
}

View File

@ -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,
}