From c61f8ac01c66fce1e230fc009e6d7da39a68eae1 Mon Sep 17 00:00:00 2001 From: EthanShoeDev <13422990+EthanShoeDev@users.noreply.github.com> Date: Mon, 6 Oct 2025 20:12:50 -0400 Subject: [PATCH] release-it stuff --- apps/mobile/.release-it.ts | 22 ++++++++-- .../react-native-uniffi-russh/.release-it.ts | 42 +++++++++++++++++++ .../react-native-uniffi-russh/package.json | 1 + .../.release-it.ts | 42 +++++++++++++++++++ .../react-native-xtermjs-webview/package.json | 16 +++---- .../tsconfig.node.json | 2 +- pnpm-lock.yaml | 11 ++++- 7 files changed, 123 insertions(+), 13 deletions(-) create mode 100644 packages/react-native-uniffi-russh/.release-it.ts create mode 100644 packages/react-native-xtermjs-webview/.release-it.ts diff --git a/apps/mobile/.release-it.ts b/apps/mobile/.release-it.ts index 6ba930f..ffe52de 100644 --- a/apps/mobile/.release-it.ts +++ b/apps/mobile/.release-it.ts @@ -1,25 +1,39 @@ import { type Config } from 'release-it'; export default { + npm: { publish: false, ignoreVersion: true }, + git: { requireCleanWorkingDir: true, - commitMessage: 'chore(release): v${version}', - tagName: 'v${version}', + tagName: '${npm.name}-v${version}', + tagAnnotation: '${npm.name} v${version}', + tagMatch: '${npm.name}-v*', + commitMessage: 'chore(${npm.name}): release v${version}', push: true, }, + github: { release: true, - assets: ['android/app/build/outputs/apk/release/app-release.apk'], + releaseName: '${npm.name} v${version}', + assets: [ + 'android/app/build/outputs/apk/release/app-release.apk', + // or the AAB, if that’s your primary store artifact: + // 'android/app/build/outputs/bundle/release/app-release.aab' + ], }, + plugins: { - 'release-it-pnpm': {}, '@release-it/conventional-changelog': { preset: 'conventionalcommits', infile: 'CHANGELOG.md', + gitRawCommitsOpts: { path: 'apps/mobile' }, }, }, + hooks: { 'before:init': ['pnpm run lint:check', 'pnpm run typecheck'], 'before:github:release': 'pnpm run build:signed:apk', + + 'after:release': 'echo "Released ${npm.name} v${version}"', }, } satisfies Config; diff --git a/packages/react-native-uniffi-russh/.release-it.ts b/packages/react-native-uniffi-russh/.release-it.ts new file mode 100644 index 0000000..9a3f2ff --- /dev/null +++ b/packages/react-native-uniffi-russh/.release-it.ts @@ -0,0 +1,42 @@ +import type { Config } from 'release-it'; + +export default { + git: { + requireCleanWorkingDir: true, + tagName: '${npm.name}-v${version}', + tagAnnotation: '${npm.name} v${version}', + tagMatch: '${npm.name}-v*', + commitMessage: 'chore(${npm.name}): release v${version}', + push: true, + }, + + // This one *does* publish to npm + npm: { + publish: true, + // pass flags you’d give to `npm publish` + publishArgs: ['--access', 'public'], + // (optional) skip npm’s own prepublish checks: + // skipChecks: true + }, + + github: { + release: true, + releaseName: '${npm.name} v${version}', + // optional: attach build artifacts + // assets: ['dist/**'] + }, + + plugins: { + '@release-it/conventional-changelog': { + preset: 'conventionalcommits', + infile: 'CHANGELOG.md', + gitRawCommitsOpts: { path: 'packages/react-native-uniffi-russh' }, + }, + }, + + hooks: { + 'before:init': ['pnpm run lint:check', 'pnpm run test'], + 'before:npm:release': 'pnpm run build', + 'after:release': 'echo "Published ${npm.name} v${version} to npm"', + }, +} satisfies Config; diff --git a/packages/react-native-uniffi-russh/package.json b/packages/react-native-uniffi-russh/package.json index 1197772..75e25d5 100644 --- a/packages/react-native-uniffi-russh/package.json +++ b/packages/react-native-uniffi-russh/package.json @@ -79,6 +79,7 @@ "react-native": "0.81.4", "react-native-builder-bob": "^0.40.13", "release-it": "^19.0.4", + "release-it-pnpm": "^4.6.6", "turbo": "^2.5.7", "typescript": "~5.9.2" }, diff --git a/packages/react-native-xtermjs-webview/.release-it.ts b/packages/react-native-xtermjs-webview/.release-it.ts new file mode 100644 index 0000000..08db11a --- /dev/null +++ b/packages/react-native-xtermjs-webview/.release-it.ts @@ -0,0 +1,42 @@ +import { type Config } from 'release-it'; + +export default { + git: { + requireCleanWorkingDir: true, + tagName: '${npm.name}-v${version}', + tagAnnotation: '${npm.name} v${version}', + tagMatch: '${npm.name}-v*', + commitMessage: 'chore(${npm.name}): release v${version}', + push: true, + }, + + // This one *does* publish to npm + npm: { + publish: true, + // pass flags you’d give to `npm publish` + publishArgs: ['--access', 'public'], + // (optional) skip npm’s own prepublish checks: + // skipChecks: true + }, + + github: { + release: true, + releaseName: '${npm.name} v${version}', + // optional: attach build artifacts + // assets: ['dist/**'] + }, + + plugins: { + '@release-it/conventional-changelog': { + preset: 'conventionalcommits', + infile: 'CHANGELOG.md', + gitRawCommitsOpts: { path: 'packages/react-native-xtermjs-webview' }, + }, + }, + + hooks: { + 'before:init': ['pnpm run lint:check', 'pnpm run test'], + 'before:npm:release': 'pnpm run build', + 'after:release': 'echo "Published ${npm.name} v${version} to npm"', + }, +} satisfies Config; diff --git a/packages/react-native-xtermjs-webview/package.json b/packages/react-native-xtermjs-webview/package.json index af2e934..7a30dde 100644 --- a/packages/react-native-xtermjs-webview/package.json +++ b/packages/react-native-xtermjs-webview/package.json @@ -27,30 +27,32 @@ }, "devDependencies": { "@epic-web/config": "^1.21.3", + "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", + "@eslint-react/eslint-plugin": "^1.53.0", "@eslint/js": "^9.35.0", "@types/react": "~19.1.12", "@types/react-dom": "^19.1.7", + "@typescript-eslint/parser": "^8.44.0", + "@typescript-eslint/utils": "^8.43.0", "@vitejs/plugin-react": "^5.0.2", "@xterm/addon-fit": "^0.10.0", "@xterm/xterm": "^5.5.0", - "js-base64": "^3.7.8", "eslint": "^9.35.0", - "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0", "eslint-plugin-react-hooks": "^5.2.0", - "@eslint-react/eslint-plugin": "^1.53.0", - "vite-plugin-singlefile": "^2.3.0", "eslint-plugin-react-refresh": "^0.4.20", - "@typescript-eslint/parser": "^8.44.0", - "@typescript-eslint/utils": "^8.43.0", "globals": "^16.4.0", + "js-base64": "^3.7.8", "prettier": "^3.6.2", "prettier-plugin-organize-imports": "^4.2.0", "react": "19.1.0", "react-dom": "19.1.0", "react-native-webview": "13.15.0", + "release-it": "^19.0.4", + "release-it-pnpm": "^4.6.6", "typescript": "~5.9.2", "typescript-eslint": "^8.44.0", "vite": "6.3.6", - "vite-plugin-dts": "^4.5.4" + "vite-plugin-dts": "^4.5.4", + "vite-plugin-singlefile": "^2.3.0" } } diff --git a/packages/react-native-xtermjs-webview/tsconfig.node.json b/packages/react-native-xtermjs-webview/tsconfig.node.json index da9370a..f74dc00 100644 --- a/packages/react-native-xtermjs-webview/tsconfig.node.json +++ b/packages/react-native-xtermjs-webview/tsconfig.node.json @@ -21,5 +21,5 @@ "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true }, - "include": ["vite.config.ts", "vite.config.internal.ts"] + "include": ["vite.config.ts", "vite.config.internal.ts", ".release-it.ts"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f4ec34..23f218d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -366,6 +366,9 @@ importers: release-it: specifier: ^19.0.4 version: 19.0.4(@types/node@24.3.0)(magicast@0.3.5) + release-it-pnpm: + specifier: ^4.6.6 + version: 4.6.6(magicast@0.3.5)(release-it@19.0.4(@types/node@24.3.0)(magicast@0.3.5)) turbo: specifier: ^2.5.7 version: 2.5.8 @@ -439,6 +442,12 @@ importers: react-native-webview: specifier: 13.15.0 version: 13.15.0(react-native@0.81.4(@babel/core@7.28.3)(@react-native-community/cli@20.0.2(typescript@5.9.2))(@types/react@19.1.12)(react@19.1.0))(react@19.1.0) + release-it: + specifier: ^19.0.4 + version: 19.0.4(@types/node@24.3.0)(magicast@0.3.5) + release-it-pnpm: + specifier: ^4.6.6 + version: 4.6.6(magicast@0.3.5)(release-it@19.0.4(@types/node@24.3.0)(magicast@0.3.5)) typescript: specifier: ~5.9.2 version: 5.9.2 @@ -14340,7 +14349,7 @@ snapshots: changelogithub@13.16.0(magicast@0.3.5): dependencies: ansis: 4.2.0 - c12: 3.1.0(magicast@0.3.5) + c12: 3.3.0(magicast@0.3.5) cac: 6.7.14 changelogen: 0.5.7(magicast@0.3.5) convert-gitmoji: 0.1.5