Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ jobs:
CURRENT_TAG="N/A"
IS_PRERELEASE="false"

if [[ -f packages/click-ui/.changeset/pre.json ]]; then
CURRENT_TAG=$(node -p "require('./packages/click-ui/.changeset/pre.json').tag")
if [[ -f .changeset/pre.json ]]; then
CURRENT_TAG=$(node -p "require('./.changeset/pre.json').tag")
IS_PRERELEASE="true"
echo "prerelease=true" >> $GITHUB_OUTPUT
echo "current_tag=$CURRENT_TAG" >> $GITHUB_OUTPUT
Expand All @@ -131,7 +131,7 @@ jobs:
- name: Prevent promotion without changes
if: steps.check-prerelease.outputs.prerelease == 'true' && steps.check-prerelease.outputs.current_tag != inputs.release_type
run: |
CHANGESET_COUNT=$(find packages/click-ui/.changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
CHANGESET_COUNT=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
echo "🔍 Debug: changeset_count=$CHANGESET_COUNT"

if [[ "$CHANGESET_COUNT" -eq 0 ]]; then
Expand All @@ -145,7 +145,7 @@ jobs:
run: |
echo "Must exit pre-release mode..."

if ! yarn workspace @clickhouse/click-ui changeset pre exit; then
if ! yarn changeset pre exit; then
echo "👹 Oops! Failed to exit pre-release mode for some reason..."
exit 1
else
Expand All @@ -156,7 +156,7 @@ jobs:
if: steps.check-prerelease.outputs.prerelease == 'true' && steps.check-prerelease.outputs.current_tag != inputs.release_type && inputs.release_type != 'latest' && inputs.release_type != 'stable'
run: |
echo "🔄 Switching from ${{ steps.check-prerelease.outputs.current_tag }} to ${{ inputs.release_type }} prerelease mode"
if ! yarn workspace @clickhouse/click-ui changeset pre exit; then
if ! yarn changeset pre exit; then
echo "👹 Oops! Failed to exit current prerelease mode for some reason..."
exit 1
else
Expand All @@ -167,7 +167,7 @@ jobs:
if: inputs.release_type != 'latest' && inputs.release_type != 'stable' && (steps.check-prerelease.outputs.prerelease != 'true' || steps.check-prerelease.outputs.current_tag != inputs.release_type)
run: |
echo "🤖 Entering ${{ inputs.release_type }} prerelease mode"
yarn workspace @clickhouse/click-ui changeset pre enter ${{ inputs.release_type }}
yarn changeset pre enter ${{ inputs.release_type }}

- name: Validate latest release eligibility
if: (inputs.release_type == 'latest' || inputs.release_type == 'stable') && steps.check-prerelease.outputs.prerelease != 'true'
Expand All @@ -187,7 +187,7 @@ jobs:
id: version-package
run: |
echo "📦 Versioning packages..."
if ! yarn workspace @clickhouse/click-ui changeset:version; then
if ! yarn changeset:version; then
echo "👹 Oops! Failed to do changeset versioning for some reason..."
exit 1
else
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
run: |
# WARNING: This is coupled with a verify release commit
# if you need to modify, apply the changes accordingly
COMMIT_TITLE=$(packages/click-ui/.scripts/bash/generate-release-commit-message "${{ steps.version-package.outputs.version }}" "${{ inputs.release_type }}")
COMMIT_TITLE=$(.scripts/bash/generate-release-commit-message "${{ steps.version-package.outputs.version }}" "${{ inputs.release_type }}")

echo "title=$COMMIT_TITLE" >> $GITHUB_OUTPUT
echo "branch=changeset-release/v${{ steps.version-package.outputs.version }}-${{ inputs.release_type }}" >> $GITHUB_OUTPUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
changeset_path=".changeset/${filename}.md"

if ! yarn changeset; then
echo "👹 Oops! Failed to create changest"
echo "👹 Oops! Failed to create changeset"
exit 1
fi

Expand All @@ -25,7 +25,7 @@ fi
new_changeset=$(echo "$untracked_changesets" | head -1)

if [[ ! -n "$new_changeset" ]]; then
echo "👹 Oops! This is embarassing but couldn't locate the expeccted generated changeset file..."
echo "👹 Oops! This is embarrassing but couldn't locate the expected generated changeset file..."
exit 1
fi

Expand Down
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## Changeset

We use [Changesets](https://github.com/changesets/changesets) to manage versioning and changelogs.

### Add a new changeset

When contributing, declare an intent or describe the changes you're making by executing the `changeset:add` command.

The wizard will ask a few questions and generate a changelog entry for you:

```sh
yarn changeset:add
```

The changesets tool keeps track of all declared changes in the `.changeset` directory.

Once completed, you must commit the changeset!

### Checking the changeset status

To check if your branch contains a changeset:

```sh
yarn changeset:status
```

### Create a new version and changelogs

To consume all changesets, and update to the most appropriate semver version and write a friendly changelog based on those changes:

> [!IMPORTANT]
> Consuming changesets is done automatically in the CI/CD environment. For this reason, you don't have to execute the command, as a contributor your single concern should be adding changesets to any relevant changes.

```sh
yarn changeset:version
```

## Release

See [Package Release](./packages/click-ui/docs/package-release.md) for detailed release instructions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@
"format": "yarn workspaces foreach -A --topological run format",
"format:fix": "yarn workspaces foreach -A --topological run format:fix",
"typecheck": "yarn workspaces foreach -A --topological run typecheck",
"prepare": "husky"
"prepare": "husky",
"changeset:add": ".scripts/bash/changeset-add",
"changeset:status": "yarn changeset status",
"changeset:verify": ".scripts/bash/changeset-verification",
"changeset:version": "yarn changeset version"
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"husky": "^9.1.7"
},
"resolutions": {
Expand Down
12 changes: 0 additions & 12 deletions packages/click-ui/.changeset/pre.json

This file was deleted.

50 changes: 0 additions & 50 deletions packages/click-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ You can find the official docs for the Click UI design system and component libr
- [Custom styling with CSS](#custom-styling-with-css)
* [Assets Management](#assets-management)
- [Convert SVG to React Component](#convert-svg-to-react-component)
* [Changesets](#changesets)
- [Add a new changeset](#add-a-new-changeset)
- [Checking the changeset status](#checking-the-changeset-status)
- [Create a new version and changelogs](#create-a-new-version-and-changelogs)
* [Release](#release)
* [Contributing](#contributing)
- [Component RFC](#component-rfc)
Expand Down Expand Up @@ -220,52 +216,6 @@ The latest static version's built and deployed automatically when contributing t

Once deployed it's available publicly at [clickhouse.design/click-ui](https://clickhouse.design/click-ui).

## Changeset

Learn to manage the versioning of changelog entries.

The following is a brief description of available commands to allow a person making a contribution make key decisions about their changes.

It'll generate a changeset, which is effectively two key bits of information:

- A version type which follows [semver](https://semver.org/)
- Change information placed in a changelog

Make good use of this simple workflow to help us release new package versions more confidently.

### Add a new changeset

When contributing, declare an intent or describe the changes you're making or adding to a release by executing the `changeset:add` command.

The wizard will ask a few questions and generate a changelog entry for you:

```sh
yarn changeset:add
```

The changesets tool keeps track of all declared changes in the `.changeset` directory.

Once completed, you must commit the changeset!

### Checking the changeset status

To check if your branch contains a changeset:

```sh
yarn changeset:status
```

### Create a new version and changelogs

To consume all changesets, and update to the most appropriate semver version and write a friendly changelog based on those changesets, the following command is available:

> [!IMPORTANT]
> Consuming changesets is done automatically in the CI/CD environment. For this reason, you don't have to execute the command, as a contributor your single concern should be adding changesets to any relevant changes.

```sh
yarn changeset:version
```

## Distribution

The package is distributed as ESM.
Expand Down
5 changes: 0 additions & 5 deletions packages/click-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,7 @@
"build:health_check": ".scripts/bash/build_output_health_check",
"build-storybook": "storybook build",
"build:watch": "watch 'yarn build' ./src",
"changeset:add": ".scripts/bash/changeset-add",
"changeset:status": "yarn changeset status",
"changeset:verify": ".scripts/bash/changeset-verification",
"circular-dependency:check": ".scripts/bash/circular-dependency-check",
"changeset:version": "yarn changeset version",
"convert:logo": ".scripts/js/convert-svg-to-react-component --type=logos",
"convert:icon": ".scripts/js/convert-svg-to-react-component --type=icons",
"convert:flag": ".scripts/js/convert-svg-to-react-component --type=flags",
Expand Down Expand Up @@ -419,7 +415,6 @@
"styled-components": "^6.1.11"
},
"devDependencies": {
"@changesets/cli": "^2.29.8",
"@playwright/test": "^1.57.0",
"@storybook/addon-a11y": "^10.1.10",
"@storybook/addon-docs": "^10.1.10",
Expand Down
Loading
Loading