fix(monorepo): export package.json from every package (#9803)

This commit is contained in:
Joel Einbinder 2021-10-26 18:41:18 -04:00 committed by GitHub
parent fac5da9517
commit c8addef03a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 6 deletions

View File

@ -31,6 +31,12 @@ else if (process.argv[3])
const playwright = require(requireName);
const packageJSON = require(requireName + '/package.json');
if (!packageJSON || !packageJSON.version) {
console.error('Should be able to require the package.json and get the version.')
process.exit(1);
}
(async () => {
for (const browserType of success) {
try {

View File

@ -16,7 +16,8 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./cli": "./cli.js",
"./package.json": "./package.json"
},
"bin": {
"playwright": "./cli.js"

View File

@ -20,6 +20,7 @@
"require": "./index.js"
},
"./cli": "./cli.js",
"./package.json": "./package.json",
"./lib/grid/gridServer": "./lib/grid/gridServer.js",
"./lib/grid/gridClient": "./lib/grid/gridClient.js",
"./lib/grid/dockerGridFactory": "./lib/grid/dockerGridFactory.js",

View File

@ -16,7 +16,8 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./": "./"
"./cli": "./cli.js",
"./package.json": "./package.json"
},
"bin": {
"playwright": "./cli.js"

View File

@ -13,8 +13,10 @@
"import": "./index.mjs",
"require": "./index.js"
},
"./src/*": "./lib/*.js",
"./*": "./*.js"
"./cli": "./cli.js",
"./package.json": "./package.json",
"./lib/cli": "./lib/cli.js",
"./reporter": "./reporter.js"
},
"bin": {
"playwright": "./cli.js"

View File

@ -15,7 +15,9 @@
".": {
"import": "./index.mjs",
"require": "./index.js"
}
},
"./cli": "./cli.js",
"./package.json": "./package.json"
},
"bin": {
"playwright": "./cli.js"

View File

@ -17,7 +17,7 @@
import type { Fixtures, PlaywrightTestOptions, PlaywrightWorkerOptions } from '@playwright/test';
import type { Browser, BrowserContext, BrowserContextOptions, BrowserType, LaunchOptions, Page } from 'playwright-core';
import { removeFolders } from 'playwright-core/lib/utils/utils';
import { browserOptionsWorkerFixture, browserTypeWorkerFixture, browserWorkerFixture, ReuseBrowserContextStorage } from '@playwright/test/src/index';
import { browserOptionsWorkerFixture, browserTypeWorkerFixture, browserWorkerFixture, ReuseBrowserContextStorage } from '../../packages/playwright-test/lib/index';
import * as path from 'path';
import * as fs from 'fs';
import * as os from 'os';