chore: allow private build-only packages (#10893)

This commit is contained in:
Joel Einbinder 2021-12-13 18:37:41 -05:00 committed by GitHub
parent f166c67707
commit d8abb18c57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 2 deletions

8
package-lock.json generated
View File

@ -4807,6 +4807,10 @@
"node": ">=6"
}
},
"node_modules/html-reporter": {
"resolved": "packages/html-reporter",
"link": true
},
"node_modules/html-webpack-plugin": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.3.2.tgz",
@ -9047,6 +9051,7 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"packages/html-reporter": {},
"packages/playwright": {
"version": "1.18.0-next",
"hasInstallScript": true,
@ -12888,6 +12893,9 @@
"terser": "^4.6.3"
}
},
"html-reporter": {
"version": "file:packages/html-reporter"
},
"html-webpack-plugin": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.3.2.tgz",

View File

@ -0,0 +1,2 @@
// write something to playwright-core/lib/web/ with webpack

View File

@ -0,0 +1,4 @@
{
"name": "html-reporter",
"private": true
}

View File

@ -35,4 +35,10 @@ function* internalDependencies(packagePath) {
}
}
module.exports = { packages, packageNameToPath };
const packagesToPublish = packages.filter(packagePath => !packagePathToJSON.get(packagePath).private);
module.exports = {
packages,
packageNameToPath,
packagesToPublish,
};

View File

@ -55,6 +55,9 @@ const PACKAGES = {
browsers: ['chromium', 'ffmpeg'],
files: LICENSE_FILES,
},
'html-reporter': {
files: [],
}
};
const dirtyFiles = [];
@ -92,6 +95,8 @@ async function lintPackage(packageName) {
// 4. Generate package.json
const pwInternalJSON = require(path.join(ROOT_PATH, 'package.json'));
const currentPackageJSON = require(path.join(packagePath, 'package.json'));
if (currentPackageJSON.private)
return;
currentPackageJSON.version = pwInternalJSON.version;
currentPackageJSON.repository = pwInternalJSON.repository;
currentPackageJSON.engines = pwInternalJSON.engines;

View File

@ -92,7 +92,7 @@ fi
echo "==================== Publishing version ${VERSION} ================"
node ./utils/prepare_packages.js
node -e "console.log(require('./utils/list_packages').packages.join('\\n'))" | while read package
node -e "console.log(require('./utils/list_packages').packagesToPublish.join('\\n'))" | while read package
do
npm publish ${package} --tag="${NPM_PUBLISH_TAG}"
done