Skip to content

Commit 232941a

Browse files
committed
Merge branch 'master' into claude/happy-rubin-82DHy
2 parents 1cd0730 + ca50ab7 commit 232941a

99 files changed

Lines changed: 1508 additions & 109316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Tabulator Build & Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Run on any tag that starts with v (e.g., v1.0.0)
7+
8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: write # Required for creating a release
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
24+
# for OIDC
25+
- name: Update npm
26+
run: npm install -g npm@latest
27+
28+
- name: Install deps
29+
run: npm ci
30+
31+
- name: Build
32+
run: npm run build
33+
34+
- name: Release
35+
uses: softprops/action-gh-release@v3
36+
with:
37+
generate_release_notes: true
38+
39+
- name: Publish Package
40+
run: npm publish --access public

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ npm-debug.log
1010
/playwright-report/
1111
/blob-report/
1212
/playwright/.cache/
13+
14+
dist/

CLAUDE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
This is a zero-dependency JS grid library.
2+
3+
Never introduce non-dev dependencies.
4+
5+
When fixing bugs:
6+
1. Try to add a failing test first to validate the bug - unit, integration, or e2e. Unit testing preferred whenever possible.
7+
2. Use mocks minimally, so we can recreate bug behavior as close to a real environment as possible.
8+
3. This library is very modular, pay attention to unintended consequences of a change across modules.
9+
4. When writing a PR for a bug issue - make sure to have the syntax "Fix #bugid" included in the PR description so that GitHub will auto-close the issue.
10+
5. Add a small comment to tests that fix specific issues with a link to the issue with a 1-sentence note. eg:
11+
```
12+
// Fix https://github.com/xyz/abc/issues/1
13+
// Date times not formatting correctly
14+
```
15+
16+
17+
Testing approach:
18+
1. Test as much as possible with unit tests
19+
2. e2e tests can be used for UI bugs, be conservative and careful with these as e2e tests can become flaky.
20+
3. If you really can't test something, that's fine, just make a note of it.
21+
4. Minimal mocking
22+
5. Follow test folder and structure conventions.
23+
24+
Architecture:
25+
26+
Tabulator's core code is fairly small by design, most functionality is added by modules. We should follow this convention.
27+
Modules can interact with each other, so always consider the effect of a module change on other modules.

bin/make-release.sh

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# Function to list the 5 most recent remote tags by date
6+
list_recent_remote_tags() {
7+
echo "Fetching the 5 most recent remote tags by date:"
8+
git ls-remote --tags origin | \
9+
grep -E 'refs/tags/v[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?$' | \
10+
while read -r hash ref; do
11+
tag="${ref#refs/tags/}"
12+
date=$(git log -1 --format='%ci' "$hash" 2>/dev/null || echo "unknown date")
13+
echo "$tag $date"
14+
done | sort -k2 -r | head -n 5
15+
}
16+
17+
# Function to get the next version in sequence
18+
guess_next_version() {
19+
# Get the most recent tag
20+
local latest_tag
21+
latest_tag=$(git ls-remote --tags origin | \
22+
grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?$' | \
23+
sort -V | tail -n 1)
24+
25+
# Strip 'v' from the tag
26+
latest_version="${latest_tag#v}"
27+
28+
if [[ "$latest_version" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)(-(alpha|beta)\.([0-9]+))?$ ]]; then
29+
major="${BASH_REMATCH[1]}"
30+
minor="${BASH_REMATCH[2]}"
31+
patch="${BASH_REMATCH[3]}"
32+
channel="${BASH_REMATCH[5]:-}"
33+
channel_num="${BASH_REMATCH[6]:-}"
34+
35+
if [[ -n "$channel" ]]; then
36+
# Increment the channel number for pre-releases
37+
channel_num=$((channel_num + 1))
38+
echo "$major.$minor.$patch-$channel.$channel_num"
39+
else
40+
# Increment the patch version for stable releases
41+
patch=$((patch + 1))
42+
echo "$major.$minor.$patch"
43+
fi
44+
else
45+
echo "1.0.0" # Default to this if no valid tags exist
46+
fi
47+
}
48+
49+
# Function to validate version format
50+
validate_version() {
51+
if [[ "$1" =~ ^v?([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)$ ]]; then
52+
echo "${BASH_REMATCH[1]}"
53+
else
54+
echo "Error: Invalid version format. Expected x.x.x or x.x.x-channel.x"
55+
exit 1
56+
fi
57+
}
58+
59+
# Step 1: List recent tags
60+
list_recent_remote_tags
61+
62+
# Step 2: Prompt user for new version with a default guess
63+
default_version=$(guess_next_version)
64+
echo ""
65+
read -p "Enter the new version (default: $default_version): " INPUT_VERSION
66+
VERSION="${INPUT_VERSION:-$default_version}"
67+
68+
# Step 3: Validate and clean the version
69+
VERSION=$(validate_version "$VERSION")
70+
NEW_TAG="v$VERSION"
71+
72+
# Confirm with the user
73+
echo ""
74+
echo "This will:"
75+
echo " - Update package.json to version: $VERSION"
76+
echo " - Push a new git tag: $NEW_TAG"
77+
read -p "Do you want to continue? (y/n): " CONFIRM
78+
79+
if [[ "$CONFIRM" != "y" ]]; then
80+
echo "Aborted."
81+
exit 0
82+
fi
83+
84+
# Step 4: Update package.json if necessary
85+
PACKAGE_VERSION=$(jq -r '.version' package.json)
86+
if [[ "$PACKAGE_VERSION" == "$VERSION" ]]; then
87+
echo "package.json is already updated to version $VERSION."
88+
else
89+
echo "Updating package.json..."
90+
jq ".version = \"$VERSION\"" package.json > package.temp.json
91+
mv package.temp.json package.json
92+
93+
# Commit changes
94+
echo "Committing changes..."
95+
git add package.json
96+
git commit -m "chore: bump version to $VERSION"
97+
git push
98+
fi
99+
100+
# Step 5: Push tag
101+
if git tag | grep -q "$NEW_TAG\$"; then
102+
echo "Tag $NEW_TAG already exists."
103+
else
104+
echo "Creating and pushing tag $NEW_TAG..."
105+
git tag "$NEW_TAG"
106+
git push origin "$NEW_TAG"
107+
fi
108+
109+
echo "Release process completed successfully."

0 commit comments

Comments
 (0)