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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "supermemoryai/code-chunk" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@supermemory/eval"]
}
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on: [push, pull_request]
on:
pull_request:
branches: ["*"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +16,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -31,3 +35,11 @@ jobs:

- name: Build
run: bun run build

- name: Check for changeset
run: |
if git diff --name-only origin/main...HEAD | grep -q "^\.changeset/.*\.md$"; then
echo "✓ Changeset found"
else
echo "⚠ No changeset found. If this PR has user-facing changes, run 'bun changeset' to add one."
fi
38 changes: 17 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@ name: Release

on:
push:
tags:
- 'v*'
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release:
name: Release Package
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -27,24 +30,17 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Type check
run: bun run type-check

- name: Lint
run: bun run lint

- name: Build
run: bun run build

- name: Generate changelog
run: bunx changelogithub
continue-on-error: true
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: bun run version
publish: bun run release
title: "chore: version packages"
commit: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to npm
run: bun publish --access public
working-directory: packages/astchunk
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
225 changes: 189 additions & 36 deletions bun.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
"test:coverage": "bun run --filter 'code-chunk' test:coverage",
"test:watch": "bun run --filter 'code-chunk' test:watch",
"type-check": "bun run --filter '*' type-check",
"eval": "bun run --filter '@supermemory/eval' start"
"eval": "bun run --filter '@supermemory/eval' start",
"changeset": "changeset",
"version": "changeset version",
"release": "bun run build && changeset publish"
},
"devDependencies": {
"@biomejs/biome": "^2.3.8",
"@changesets/changelog-github": "^0.5.2",
"@changesets/cli": "^2.29.8",
"typescript": "^5.9.3"
}
}
2 changes: 0 additions & 2 deletions packages/code-chunk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
"scripts": {
"build": "bunup src/index.ts src/wasm.ts",
"dev": "bunup --watch",
"release": "bumpp --commit --push --tag",
"test": "bun test",
"test:coverage": "bun test --coverage",
"test:watch": "bun test --watch",
"type-check": "tsc --noEmit"
},
"devDependencies": {
"@types/bun": "^1.3.4",
"bumpp": "^10.3.2",
"bunup": "^0.16.10"
},
"peerDependencies": {
Expand Down