diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index e22199de..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Release - -# Publishing half of the release flow (versioning runs on canary, see -# version.yml). Publishes whatever the committed publish lock holds that -# isn't on npm yet, then creates the git tag and GitHub release. Runs on both -# branches, but each publishes a different channel: -# -# - canary: prerelease versions only (x.y.z-canary.N, npm dist-tag -# "canary"), so prereleases ship as soon as their version PR merges. -# Stable versions never publish from here — they wait for promotion. -# - main: everything, once canary is promoted. -# -# Already-published versions are skipped, so re-runs, promotions with nothing -# pending, and prereleases that already shipped from canary are safe no-ops. -on: - push: - branches: - - main - - canary - workflow_dispatch: - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -permissions: - contents: write # push git tags, create GitHub releases - id-token: write # npm trusted publishing (OIDC) — no NPM_TOKEN needed - -jobs: - release: - name: Publish - # npm trusted publishing (OIDC) is only supported on GitHub-hosted runners, - # so this job intentionally does not use the depot-* runners or a - # container image like the rest of this repo's workflows. - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - fetch-depth: 0 - - - name: pnpm setup - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 - - - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: 24 - cache: pnpm - registry-url: https://registry.npmjs.org - - - name: Install packages - run: pnpm install --frozen-lockfile - - - name: Check release channel - id: channel - run: echo "prerelease=$(node -p "require('./package.json').version.includes('-')")" >> "$GITHUB_OUTPUT" - - # `tegami publish` publishes via `pnpm publish`, which runs this - # package's own `prepublishOnly` script (`pnpm run build`) — no separate - # build step needed here. - - name: Publish - if: github.ref_name == 'main' || (github.ref_name == 'canary' && steps.channel.outputs.prerelease == 'true') - run: pnpm tegami publish - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/tegami-pr-comment.yml b/.github/workflows/tegami-pr-comment.yml deleted file mode 100644 index ee487be4..00000000 --- a/.github/workflows/tegami-pr-comment.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Tegami PR Comment - -# Posts the preview built by tegami-pr.yml as a PR comment. Triggered by -# `workflow_run` so it runs in the base-repo context with write permissions, -# without ever executing the PR's code. -on: - workflow_run: - workflows: ['Tegami PR'] - types: [completed] - -permissions: - actions: read - contents: read - pull-requests: write - -jobs: - comment: - name: Post preview comment - if: > - github.event.workflow_run.conclusion == 'success' && - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.head_repository.full_name == github.repository - # No container image: tegami's git plugin needs the runner's git against - # the checkout workspace (same reason as version.yml). node:24-slim ships - # without git, so the container variant can't run tegami. - runs-on: depot-ubuntu-22.04-2 - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - - name: pnpm setup - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 - - - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: 24 - cache: pnpm - - - name: Install packages - run: pnpm install --frozen-lockfile - - - name: Download preview - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: tegami-pr-preview - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ github.token }} - - - name: Post preview comment - run: pnpm tegami pr comment tegami-pr-preview.md - env: - GITHUB_TOKEN: ${{ github.token }} - diff --git a/.github/workflows/tegami-pr.yml b/.github/workflows/tegami-pr.yml deleted file mode 100644 index ad025d68..00000000 --- a/.github/workflows/tegami-pr.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Tegami PR - -# Builds the release-preview comment for a PR. Runs on `pull_request` (NOT -# `pull_request_target`), so it executes untrusted PR code and stays -# read-only. The companion tegami-pr-comment.yml posts the result with write -# permissions without ever running PR code. -on: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: read - -jobs: - preview: - name: Release preview - # No container image: tegami's git plugin needs the runner's git against - # the checkout workspace (same reason as version.yml). node:24-slim ships - # without git, so the container variant can't run tegami. - runs-on: depot-ubuntu-22.04-2 - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - fetch-depth: 0 - - - name: pnpm setup - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 - - - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: 24 - cache: pnpm - - - name: Install packages - run: pnpm install --frozen-lockfile - - - name: Release preview - run: pnpm tegami pr preview --artifact tegami-pr-preview.md - - - name: Upload preview - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: tegami-pr-preview - path: tegami-pr-preview.md diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml deleted file mode 100644 index d291f6aa..00000000 --- a/.github/workflows/version.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Version - -# Versioning half of the release flow (publishing runs on main, see -# release.yml). On pushes to canary with pending changelogs (.tegami/*.md), -# opens or updates the Version Packages PR against canary with the bumped -# versions and the publish lock. While that lock is still unpublished, tegami -# skips further versioning until main publishes it. -on: - push: - branches: - - canary - workflow_dispatch: - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -permissions: - contents: read - -jobs: - version: - name: Version packages - # No container image: tegami commits and pushes the Version Packages - # branch, so it needs the runner's git against the checkout workspace. - runs-on: depot-ubuntu-22.04-2 - timeout-minutes: 10 - steps: - # Push the branch and open the PR as the resend-version-bump GitHub App - # instead of the default GITHUB_TOKEN: branches and PRs created with the - # default token don't trigger other workflows, so the Version Packages - # PR would never get its required CI checks. Same setup as - # react-email's bump.yml. - - name: Generate GitHub App token - id: app-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - app-id: ${{ secrets.BOT_APP_ID }} - private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} - permission-contents: write - permission-pull-requests: write - - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - fetch-depth: 0 - token: ${{ steps.app-token.outputs.token }} - - - name: pnpm setup - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 - - - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: 24 - cache: pnpm - - - name: Install packages - run: pnpm install --frozen-lockfile - - # The GIT_* env vars override the github-actions[bot] identity that - # tegami's git plugin hardcodes in CI, so the version commit is authored - # by the bot that pushes it. - - name: Version packages - run: pnpm tegami version - env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - GIT_AUTHOR_NAME: resend-version-bump[bot] - GIT_AUTHOR_EMAIL: 277115511+resend-version-bump[bot]@users.noreply.github.com - GIT_COMMITTER_NAME: resend-version-bump[bot] - GIT_COMMITTER_EMAIL: 277115511+resend-version-bump[bot]@users.noreply.github.com diff --git a/.tegami/publish-lock.yaml b/.tegami/publish-lock.yaml deleted file mode 100644 index 223ab18c..00000000 --- a/.tegami/publish-lock.yaml +++ /dev/null @@ -1,15 +0,0 @@ -core:changelogs: - - content: "---\npackages:\n npm:resend:\n type: minor\n---\n\n## Support tags and scheduledAt in batch email options\n" - filename: 2026-07-15-batch-tags-scheduled-at.md - v: 0.0.0 - - content: "---\npackages:\n npm:resend:\n replay:\n - exit-prerelease(npm:resend)\n---\n\n## Add `resend.suppressions` with `add`, `get`, `list`, `remove`, and batch `add`/`remove` methods for managing suppression list entries\n" - filename: 2026-07-13-mrjlnp9f.md - v: 0.0.0 -core:packages: - - changelogIds: - - 2026-07-15-batch-tags-scheduled-at.md - - 2026-07-13-mrjlnp9f.md - id: npm:resend - updated: true -npm:packages: - - id: npm:resend diff --git a/package.json b/package.json index 32372c72..bdddf053 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "lint": "biome check .", "lint:fix": "biome check . --write", "prepublishOnly": "pnpm run build", - "tegami": "node --experimental-strip-types scripts/tegami.mts", "test": "vitest run --exclude e2e", "test:dev": "cross-env TEST_MODE=dev vitest run --exclude e2e", "test:e2e": "vitest run e2e", @@ -79,7 +78,6 @@ "react": "19.2.7", "react-dom": "19.2.7", "rimraf": "6.1.3", - "tegami": "1.2.5", "tsdown": "0.21.10", "typescript": "6.0.3", "vitest": "4.1.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 952046f3..b6c765ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,9 +57,6 @@ importers: rimraf: specifier: 6.1.3 version: 6.1.3 - tegami: - specifier: 1.2.5 - version: 1.2.5 tsdown: specifier: 0.21.10 version: 0.21.10(typescript@6.0.3) @@ -165,14 +162,6 @@ packages: cpu: [x64] os: [win32] - '@clack/core@1.4.3': - resolution: {integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==} - engines: {node: '>= 20.12.0'} - - '@clack/prompts@1.7.0': - resolution: {integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==} - engines: {node: '>= 20.12.0'} - '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} @@ -447,9 +436,6 @@ packages: '@quansync/fs@1.0.0': resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==} - '@rainbowatcher/toml-edit-js@0.6.5': - resolution: {integrity: sha512-EdALJyTDcp2yOxeVw1OJevOF7NZrlWAbVEnOnQBV7YqycVCI0OcpDy6oLUa8vqSvv2F1RmXW7kz1kgYv2A5h/w==} - '@react-email/render@2.0.0': resolution: {integrity: sha512-rdjNj6iVzv8kRKDPFas+47nnoe6B40+nwukuXwY4FCwM7XBg6tmYr+chQryCuavUj2J65MMf6fztk1bxOUiSVA==} engines: {node: '>=22.0.0'} @@ -1002,15 +988,6 @@ packages: fast-sha256@1.3.0: resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} - fast-string-truncated-width@3.0.3: - resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} - - fast-string-width@3.0.2: - resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} - - fast-wrap-ansi@0.2.2: - resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} - fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -1406,11 +1383,6 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.8.5: - resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} - engines: {node: '>=10'} - hasBin: true - send@0.19.2: resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} engines: {node: '>= 0.8.0'} @@ -1452,9 +1424,6 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - slugify@1.6.6: resolution: {integrity: sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw==} engines: {node: '>=8.0.0'} @@ -1484,9 +1453,6 @@ packages: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} - tegami@1.2.5: - resolution: {integrity: sha512-obFFOZLVeLl/CHL+HDG1PLua5FWAPTmP2DmT3vBSqO2wdg3MHIGHuLp6hy173sLAVvDUclgyJmg6fGzGWFYi5Q==} - tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -1816,18 +1782,6 @@ snapshots: '@biomejs/cli-win32-x64@2.5.3': optional: true - '@clack/core@1.4.3': - dependencies: - fast-wrap-ansi: 0.2.2 - sisteransi: 1.0.5 - - '@clack/prompts@1.7.0': - dependencies: - '@clack/core': 1.4.3 - fast-string-width: 3.0.2 - fast-wrap-ansi: 0.2.2 - sisteransi: 1.0.5 - '@emnapi/core@1.10.0': dependencies: '@emnapi/wasi-threads': 1.2.1 @@ -2087,8 +2041,6 @@ snapshots: dependencies: quansync: 1.0.0 - '@rainbowatcher/toml-edit-js@0.6.5': {} - '@react-email/render@2.0.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': dependencies: html-to-text: 9.0.5 @@ -2556,16 +2508,6 @@ snapshots: fast-sha256@1.3.0: {} - fast-string-truncated-width@3.0.3: {} - - fast-string-width@3.0.2: - dependencies: - fast-string-truncated-width: 3.0.3 - - fast-wrap-ansi@0.2.2: - dependencies: - fast-string-width: 3.0.2 - fdir@6.5.0(picomatch@4.0.3): optionalDependencies: picomatch: 4.0.3 @@ -2979,8 +2921,6 @@ snapshots: semver@7.7.4: {} - semver@7.8.5: {} - send@0.19.2: dependencies: debug: 2.6.9 @@ -3048,8 +2988,6 @@ snapshots: siginfo@2.0.0: {} - sisteransi@1.0.5: {} - slugify@1.6.6: {} source-map-js@1.2.1: {} @@ -3069,15 +3007,6 @@ snapshots: string-argv@0.3.2: {} - tegami@1.2.5: - dependencies: - '@clack/prompts': 1.7.0 - '@rainbowatcher/toml-edit-js': 0.6.5 - semver: 7.8.5 - tinyexec: 1.2.4 - tinyglobby: 0.2.17 - yaml: 2.9.0 - tinybench@2.9.0: {} tinyexec@1.1.1: {} @@ -3239,7 +3168,8 @@ snapshots: wrappy@1.0.2: {} - yaml@2.9.0: {} + yaml@2.9.0: + optional: true zod-package-json@1.2.0: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bd851f37..5ed0b5af 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,2 @@ allowBuilds: esbuild: true -minimumReleaseAgeExclude: - - tegami@1.1.2 diff --git a/scripts/tegami.mts b/scripts/tegami.mts deleted file mode 100644 index a63e9d68..00000000 --- a/scripts/tegami.mts +++ /dev/null @@ -1,78 +0,0 @@ -// scripts/tegami.mts — Tegami versioning + publishing config. -// -// Run via `pnpm tegami` (see the "tegami" script in package.json). Requires -// Node.js 24+. Docs: https://tegami.fuma-nama.dev -import { tegami } from 'tegami'; -import { createCli } from 'tegami/cli'; -import { github } from 'tegami/plugins/github'; - -const paper = tegami({ - npm: { - client: 'pnpm', - // npm trusted publishing (OIDC) — no NPM_TOKEN secret needed. This only - // takes effect once a trusted publisher is configured for the "resend" - // package on npmjs.com, pointing at this exact workflow file - // (.github/workflows/release.yml) in resend/resend-node. - // https://docs.npmjs.com/trusted-publishers - trustedPublish: { - provider: 'github', - workflow: 'release.yml', - }, - }, - plugins: [ - github({ - repo: 'resend/resend-node', - release: { - // Default title is `formatPackageVersion(name, version, distTag)` - // (e.g. "resend@6.17.0"), independent of the `git.tag` override - // below. Reuse `tag` so the release title and its tag/URL match. - create({ tag }) { - return { title: tag }; - }, - }, - versionPr: { - // Versioning happens on canary (version.yml): the Version Packages PR - // targets canary with the bumped versions and the publish lock. - // Publishing happens in release.yml: prereleases straight from - // canary, stable versions from main once canary is promoted. - // - // To enter prerelease mode, add to the tegami() options above: - // packages: { resend: { prerelease: 'canary' } } - // Bumps then produce x.y.z-canary.N under the "canary" npm dist-tag. - // Removing it graduates the next release back to a stable version, - // replaying the changelogs consumed during the prerelease cycle. - base: 'canary', - // Put the release version in the Version Packages PR title (e.g. - // "chore: release 6.17.0"), matching this repo's existing release - // commit convention and its PR title check. - // - // Must be a method (not an arrow) so `this` binds to the - // TegamiContext. `create` runs after the draft is applied, so the - // graph already holds the bumped version — do not re-derive it with - // bumpVersion(), which would double-count the bump. - create() { - const version = this.graph.get('npm:resend')?.version; - return { - title: version ? `chore: release ${version}` : 'chore: release', - }; - }, - }, - }), - { - name: 'git-tag-format', - // The github plugin's git tags default to `resend@6.17.0`. This repo - // only ever publishes the one package, so drop that prefix and tag - // `v6.17.0` instead, matching this repo's pre-Tegami tags. Runs after - // the (enforce: "pre") git plugin's own `initPublishPlan`, which is - // what sets `git.tag` in the first place. - initPublishPlan({ plan }) { - for (const [id, packagePlan] of plan.packages) { - const version = this.graph.get(id)?.version; - if (version) - packagePlan.git = { ...packagePlan.git, tag: `v${version}` }; - } - }, - }, - ], -}); -void createCli(paper).parseAsync();