From d35d0dda66f55fc261bd6f50120ab68dc3d800b3 Mon Sep 17 00:00:00 2001 From: goosewobbler Date: Thu, 22 Aug 2024 01:10:15 +0100 Subject: [PATCH 1/4] fix(ci): pack after bump --- package.json | 1 - packages/@wdio_electron-types/package.json | 4 +++- packages/@wdio_electron-utils/package.json | 4 +++- packages/wdio-electron-service/package.json | 4 +++- turbo.json | 18 +++--------------- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 2cd3305a..38fbade8 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "init-forge:apps:mac-universal": "tsx ./scripts/init-forge-apps.ts", "lint": "cross-env ESLINT_USE_FLAT_CONFIG=true eslint \"**/*.{j,mj,cj,t}s\"", "lint:fix": "cross-env ESLINT_USE_FLAT_CONFIG=true eslint \"**/*.{j,mj,cj,t}s\" --fix", - "package": "turbo run pack --filter=wdio-electron-service --filter=@wdio* --only", "prepare": "husky", "release": "turbo run release --filter=wdio-electron-service --filter=@wdio* --only --concurrency=1", "test": "turbo run test:unit test:e2e", diff --git a/packages/@wdio_electron-types/package.json b/packages/@wdio_electron-types/package.json index f8fd29c4..53dbcee9 100644 --- a/packages/@wdio_electron-types/package.json +++ b/packages/@wdio_electron-types/package.json @@ -12,7 +12,6 @@ "clean": "pnpm clean:dist && pnpm dlx shx rm -rf ./node_modules pnpm-lock.yaml", "clean:dist": "pnpm dlx shx rm -rf ./dist", "build": "tsc", - "pack": "pnpm pack", "release": "release-it --ci --npm.skipChecks --no-git.requireCleanWorkingDir" }, "devDependencies": { @@ -33,6 +32,9 @@ "dist/*" ], "release-it": { + "hooks": { + "after:bump": "pnpm pack" + }, "npm": { "publish": true }, diff --git a/packages/@wdio_electron-utils/package.json b/packages/@wdio_electron-utils/package.json index 732fc47f..9b9d0b12 100644 --- a/packages/@wdio_electron-utils/package.json +++ b/packages/@wdio_electron-utils/package.json @@ -33,7 +33,6 @@ "build": "pnpm build:esm && pnpm build:cjs", "build:esm": "tsc --outDir dist", "build:cjs": "tsc --build tsconfig.cjs.json", - "pack": "pnpm pack", "release": "release-it --ci --npm.skipChecks --no-git.requireCleanWorkingDir", "test:unit": "vitest --coverage --watch=false", "test:dev": "vitest --coverage", @@ -59,6 +58,9 @@ "vitest": "^2.0.5" }, "release-it": { + "hooks": { + "after:bump": "pnpm pack" + }, "npm": { "publish": true }, diff --git a/packages/wdio-electron-service/package.json b/packages/wdio-electron-service/package.json index ad92fc91..fd8032b6 100644 --- a/packages/wdio-electron-service/package.json +++ b/packages/wdio-electron-service/package.json @@ -50,7 +50,6 @@ "build:cjs": "pnpm build:cjs:copy && pnpm build:cjs:compile", "build:cjs:copy": "cp -f ./src/preload.ts ./src/cjs/preload.ts && cp -f ./src/main.ts ./src/cjs/main.ts && cp -f ./src/constants.ts ./src/cjs/constants.ts", "build:cjs:compile": "tsc --project tsconfig.cjs.json --outDir dist/cjs", - "pack": "pnpm pack", "release": "release-it --ci --npm.skipChecks --no-git.requireCleanWorkingDir", "test:unit": "vitest --coverage --watch=false", "test:dev": "vitest --coverage", @@ -114,6 +113,9 @@ "dist/*" ], "release-it": { + "hooks": { + "after:bump": "pnpm pack" + }, "npm": { "publish": true }, diff --git a/turbo.json b/turbo.json index e2daff07..f9a960e0 100644 --- a/turbo.json +++ b/turbo.json @@ -62,12 +62,8 @@ "dependsOn": ["//#lint", "//#format:check", "test:unit"], "outputs": ["dist/**"] }, - "@wdio/electron-types#pack": { - "dependsOn": ["build"], - "cache": false - }, "@wdio/electron-types#release": { - "dependsOn": ["pack"], + "dependsOn": ["build"], "cache": false, "env": ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"] }, @@ -75,12 +71,8 @@ "dependsOn": ["@wdio/electron-types#build", "test:unit"], "outputs": ["dist/**"] }, - "@wdio/electron-utils#pack": { - "dependsOn": ["build"], - "cache": false - }, "@wdio/electron-utils#release": { - "dependsOn": ["pack"], + "dependsOn": ["build"], "cache": false, "env": ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"] }, @@ -144,12 +136,8 @@ "dependsOn": ["@wdio/electron-utils#build", "test:unit"], "outputs": ["dist/**"] }, - "wdio-electron-service#pack": { - "dependsOn": ["build"], - "cache": false - }, "wdio-electron-service#release": { - "dependsOn": ["pack"], + "dependsOn": ["build"], "cache": false, "env": ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"] } From 15493546a2f2a6718e08ff37f81c240c8e7c3637 Mon Sep 17 00:00:00 2001 From: goosewobbler Date: Thu, 22 Aug 2024 22:45:32 +0100 Subject: [PATCH 2/4] chore: add readme for types & utils --- packages/@wdio_electron-types/README.md | 10 ++++++++++ packages/@wdio_electron-utils/README.md | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 packages/@wdio_electron-types/README.md create mode 100644 packages/@wdio_electron-utils/README.md diff --git a/packages/@wdio_electron-types/README.md b/packages/@wdio_electron-types/README.md new file mode 100644 index 00000000..928ed138 --- /dev/null +++ b/packages/@wdio_electron-types/README.md @@ -0,0 +1,10 @@ +# WDIO Electron Types + + + + + + +
+ +**Types for the [WDIO Electron Service](https://github.com/webdriverio-community/wdio-electron-service)** diff --git a/packages/@wdio_electron-utils/README.md b/packages/@wdio_electron-utils/README.md new file mode 100644 index 00000000..1ecacd4d --- /dev/null +++ b/packages/@wdio_electron-utils/README.md @@ -0,0 +1,10 @@ +# WDIO Electron Utils + + + + + + +
+ +**Utility Functions for the [WDIO Electron Service](https://github.com/webdriverio-community/wdio-electron-service)** From c72c023744e4421170ac2beafe128b6174b3945c Mon Sep 17 00:00:00 2001 From: goosewobbler Date: Thu, 22 Aug 2024 22:46:27 +0100 Subject: [PATCH 3/4] chore: ensure released packages have README and LICENSE --- scripts/release.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/release.ts b/scripts/release.ts index 26032cf5..90a29e4a 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -4,5 +4,9 @@ import shell from 'shelljs'; const options = process.argv.slice(2).join(' '); +shell.cp(['README.md', 'LICENSE'], 'packages/wdio-electron-service'); +shell.cp(['LICENSE'], 'packages/@wdio_electron-utils'); +shell.cp(['LICENSE'], 'packages/@wdio_electron-types'); + shell.exec(`pnpm run release -- ${options}`); shell.exec(`release-it -VV ${options}`); From da7d05a379bb86db134eee352ec3d4de50fc2f77 Mon Sep 17 00:00:00 2001 From: goosewobbler Date: Thu, 22 Aug 2024 23:10:09 +0100 Subject: [PATCH 4/4] chore: downgrade to 7.0.0 --- package.json | 2 +- packages/@wdio_electron-types/package.json | 2 +- packages/@wdio_electron-utils/package.json | 2 +- packages/wdio-electron-service/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 593a3039..b340e180 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wdio-electron-service-monorepo", "private": true, "type": "module", - "version": "7.0.1", + "version": "7.0.0", "engines": { "node": ">=18 || >=20" }, diff --git a/packages/@wdio_electron-types/package.json b/packages/@wdio_electron-types/package.json index 492e1d94..9b036b9d 100644 --- a/packages/@wdio_electron-types/package.json +++ b/packages/@wdio_electron-types/package.json @@ -1,6 +1,6 @@ { "name": "@wdio/electron-types", - "version": "7.0.1", + "version": "7.0.0", "description": "Types for WebdriverIO Electron Service", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/@wdio_electron-utils/package.json b/packages/@wdio_electron-utils/package.json index 2b2cc2f4..ce31ab8f 100644 --- a/packages/@wdio_electron-utils/package.json +++ b/packages/@wdio_electron-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wdio/electron-utils", - "version": "7.0.1", + "version": "7.0.0", "description": "Utilities for WebdriverIO Electron Service", "module": "dist/index.js", "main": "dist/cjs/index.js", diff --git a/packages/wdio-electron-service/package.json b/packages/wdio-electron-service/package.json index 2f108609..8785379a 100644 --- a/packages/wdio-electron-service/package.json +++ b/packages/wdio-electron-service/package.json @@ -1,6 +1,6 @@ { "name": "wdio-electron-service", - "version": "7.0.1", + "version": "7.0.0", "description": "WebdriverIO service to enable Electron testing", "author": "Sam Maister ", "homepage": "https://github.com/webdriverio-community/wdio-electron-service",