devops: release create-playwright over publish infra (#9683)

This commit is contained in:
Max Schmitt 2021-10-22 10:13:49 +02:00 committed by GitHub
parent 94d1fcf835
commit 60939a91b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -1,10 +1,12 @@
{ {
"name": "create-playwright", "name": "create-playwright",
"version": "0.1.7", "version": "1.17.0-next",
"description": "Getting started with writing end-to-end tests with Playwright.", "description": "Getting started with writing end-to-end tests with Playwright.",
"repository": "github:Microsoft/playwright", "repository": "github:Microsoft/playwright",
"homepage": "https://playwright.dev", "homepage": "https://playwright.dev",
"author": "Microsoft", "author": {
"name": "Microsoft Corporation"
},
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
@ -12,7 +14,7 @@
"bin": { "bin": {
"create-playwright": "./index.js" "create-playwright": "./index.js"
}, },
"license": "MIT", "license": "Apache-2.0",
"scripts": { "scripts": {
"test": "npx playwright test" "test": "npx playwright test"
} }

View File

@ -58,7 +58,6 @@ const PACKAGES = {
'create-playwright': { 'create-playwright': {
browsers: [], browsers: [],
files: [], files: [],
ignore: true,
} }
}; };
@ -85,8 +84,6 @@ const dirtyFiles = [];
async function lintPackage(packageName) { async function lintPackage(packageName) {
const packagePath = packageNameToPath.get(packageName); const packagePath = packageNameToPath.get(packageName);
const package = PACKAGES[packageName]; const package = PACKAGES[packageName];
if (package.ignore)
return;
if (!package) { if (!package) {
console.log(`ERROR: unknown package ${packageName}`); console.log(`ERROR: unknown package ${packageName}`);
process.exit(1); process.exit(1);
@ -105,7 +102,7 @@ async function lintPackage(packageName) {
currentPackageJSON.homepage = pwInternalJSON.homepage; currentPackageJSON.homepage = pwInternalJSON.homepage;
currentPackageJSON.author = pwInternalJSON.author; currentPackageJSON.author = pwInternalJSON.author;
currentPackageJSON.license = pwInternalJSON.license; currentPackageJSON.license = pwInternalJSON.license;
for (const name of Object.keys(currentPackageJSON.dependencies)) { for (const name of Object.keys(currentPackageJSON.dependencies || {})) {
if (name in PACKAGES) if (name in PACKAGES)
currentPackageJSON.dependencies[name] = `=${pwInternalJSON.version}`; currentPackageJSON.dependencies[name] = `=${pwInternalJSON.version}`;
} }

View File

@ -80,10 +80,6 @@ echo "==================== Publishing version ${VERSION} ================"
node ./utils/prepare_packages.js 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').packages.join('\\n'))" | while read package
do do
if [[ ${package} == *"create-playwright" ]]; then
echo "Skipping ${package}..."
continue
fi
npm publish ${package} --tag="${NPM_PUBLISH_TAG}" npm publish ${package} --tag="${NPM_PUBLISH_TAG}"
done done