Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

release-grapher-package

БесплатноЗапускает вложенные скриптыНе проверен

Release a new version of the @ourworldindata/grapher npm package — bump the version and open a draft release PR whose description is a changelog of what…

owidот owid★ 1 574 звезды на GitHub

Об этом скилле

Release the grapher package

A release is a PR that bumps version in packages/@ourworldindata/grapher/package.json. Once it is merged, CI publishes the package and tags the commit grapher@<version> (see After the merge).

Two things are fixed by CI and override the usual repo conventions:

  • The commit subject and the PR title must be exactly chore: release grapher@<version> — no gitmoji, no 🤖. The Buildkite publish and .github/workflows/tag-package-releases.yml both match on that subject.
  • The PR holds the release commit and, optionally, one docs commit before it (step 4), nothing else. It is squash-merged (one commit with the PR title) or rebase-merged (the release commit must then be the last one).

1. Preconditions

git status --short                      # must be empty
git fetch origin master --tags
LAST=$(git tag -l 'grapher@*' --sort=-v:refname | head -1); echo "$LAST"
git show origin/master:packages/@ourworldindata/grapher/package.json | jq -r .version
gh pr list --state open --search '"chore: release grapher@" in:title' --json number,title,url
  • The version on master must be the one in $LAST. If it isn't, a release was merged without being tagged (or the other way round): stop and tell the user.
  • If a release PR is already open, stop and ask whether to update that one.

2. Collect the changes

.claude/skills/release-grapher-package/list-changes.sh

This lists what landed on master since $LAST and touches the published package: grapher itself, the workspace packages bundled into it (core-table, components, utils, types — grapher's tsconfig references) and the shared build config. There is one entry per PR, with its number, its title and the number of files it touches per package; tests are left out. Entries that leave grapher and core-table alone also list their files, because most of those are site-only.

The path filter over-includes — types and utils are shared with the site, the admin and the baker — so judge every entry:

  • Drop what doesn't reach a grapher consumer: gdoc, db, site, search, deploy, multi-dim page, experiment and bespoke types or helpers (types/src/{gdocTypes,dbTypes,siteTypes}/, utils/src/{search,experiments}/, …), and lint, format, test or dev-tooling churn. If unsure whether grapher uses something, git grep -n <symbol> -- packages/@ourworldindata/grapher/src packages/@ourworldindata/core-table/src.
  • Drop the site half of mixed PRs. A PR titled after a site feature that touches many grapher files usually changed grapher on the way; find out what with git log --no-merges --oneline <sha>^1..<sha>^2 -- packages/@ourworldindata/grapher packages/@ourworldindata/core-table (merge commits) or git show --stat <sha>, and describe that.
  • Keep dependency upgrades in grapher/package.json as one line: its dependencies are bundled into the package.
  • Docs-only changes (packageDocs/, the readme) aren't changelog material; step 4 checks the docs against the changelog.

3. Find the breaking changes

P=packages/@ourworldindata
git diff --stat "$LAST"..origin/master -- $P/grapher/src/grapher.public.ts $P/grapher/src/grapherApi.tsx \
    $P/grapher/src/core/Grapher.tsx $P/grapher/src/core/GrapherState.tsx \
    $P/grapher/src/core/FetchingGrapher.tsx $P/grapher/src/schema $P/grapher/package.json \
    $P/core-table/src/OwidTable.ts $P/types/src/grapherTypes \
    $P/types/src/OwidVariableDisplayConfigInterface.ts $P/types/src/domainTypes/CoreTableTypes.ts \
    packageDocs/docs

Read those diffs. grapher.public.ts is the package's entry point, but it mostly re-exports, so the public surface is defined elsewhere: grapherApi.tsx (GrapherLoader and its options), Grapher / GrapherProgrammaticInterface in core/Grapher.tsx, GrapherState in core/GrapherState.tsx, FetchingGrapher in core/FetchingGrapher.tsx, OwidTable in core-table/src/OwidTable.ts, GrapherInterface (the chart config) and DimensionProperty in types/src/grapherTypes/ together with the schema, OwidChartDimensionInterface in types/src/OwidVariableDisplayConfigInterface.ts, and OwidColumnDef / ColumnTypeNames in CoreTableTypes.ts. If grapher.public.ts exports something else by now, read where that comes from as well. Also look at publishConfig and peerDependencies in package.json.

Breaking for a consumer: a removed or renamed export, prop, config field or column def field, a changed default, input that is read differently, a new schema version, a raised peer dependency or engines requirement. git diff "$LAST"..origin/master -- <file> | grep '^-' shows what a file lost.

Members marked /** @internal */ (in GrapherProgrammaticInterface and elsewhere) aren't public API: changing or removing one isn't breaking, adding one isn't "New", and the docs don't need to cover them. Check the old version's comment (git show "$LAST":<file>) before calling a r

Полный SKILL.md на GitHub

Установить release-grapher-package в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

list-changes.sh

FAQ

Что делает скилл release-grapher-package?

Release a new version of the @ourworldindata/grapher npm package — bump the version and open a draft release PR whose description is a changelog of what changed in grapher and the packages bundled into it since the last release, flagging breaking changes and outdated package docs along the way. Use when asked to release the grapher package, publish a new grapher version, bump grapher, or cut a grapher release.

Как установить скилл release-grapher-package?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл release-grapher-package запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить release-grapher-package с