Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .changeset/calm-tools-align.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- uses: jdx/mise-action@v4
- run: pnpm install --frozen-lockfile
- run: mise :biome
- run: mise :verify
- run: mise //...:build
- run: mise verify

changeset:
# The Version Packages PR is *built by* `changeset version`, which consumes
Expand All @@ -33,7 +30,8 @@ jobs:
with:
fetch-depth: 0
- uses: jdx/mise-action@v4
- run: pnpm install --frozen-lockfile
# Fails if a *publishable* package changed without a changeset.
# If the change needs no release (tests, docs, refactor), record that with:
# changeset add --empty
- run: changeset status --since=origin/main
- run: pnpm exec changeset status --since=origin/main
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: jdx/mise-action@v4 # installs node/pnpm from mise.toml — single source of truth
- uses: jdx/mise-action@v4 # node from .node-version; pnpm via corepack (packageManager field)
- run: pnpm install --frozen-lockfile
# On a push with pending changesets -> opens/updates a "version packages" PR.
# On a push where that PR was merged (no changesets left) -> publishes.
# The build runs via each package's `prepack` hook during publish.
- uses: changesets/action@v1
with:
version: changeset version
publish: changeset publish
version: pnpm exec changeset version
publish: pnpm exec changeset publish
commit: "chore: version packages"
title: "Version Packages"
env:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ node_modules
# misc
.DS_Store
*.pem

# build
dist

# turbo
.turbo
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
13 changes: 8 additions & 5 deletions hk.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ hooks {
fix = true
stash = true
steps {
["biome"] {
["lint"] {
glob = List("**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "**/*.css", "**/*.json")
check = "mise :biome {{ files }}"
fix = "mise :biome --write {{ files }}"
check = "mise :lint {{ files }}"
fix = "mise :lint --write {{ files }}"
}
}
}
["pre-push"] {
steps {
["verify"] {
check = "mise :verify"
["check"] {
check = "mise :check"
}
["test"] {
check = "mise :test"
}
}
}
Expand Down
55 changes: 43 additions & 12 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,54 @@ monorepo_root = true
config_roots = ["packages/*"]

[tools]
biome = "2"
hk = "1"
node = "24"
"npm:@changesets/cli" = "2"
pnpm = "11"
hk = "latest" # Git hooks
biome = "latest" # formatter and linter

[settings]
# Install node from .node-version
idiomatic_version_file_enable_tools = ["node"]

[hooks]
postinstall = "hk install --mise"
# Wire up Git hooks and get pnpm from packageManager
postinstall = "hk install --mise && npx corepack enable"

[env]
# Command lines will be "turbo build" instead of "pnpm exec turbo build".
_.path = ["{{config_root}}/node_modules/.bin"]


# Contract verbs

[tasks.verify]
depends = ["lint", "check", "test"]
description = "Perform all steps that verify code quality"

# Internal / hidden tasks

[tasks.install]
description = "Install and wire up project dependencies"
hide = true
run = "pnpm install"
sources = ["package.json", "packages/*/package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
outputs = ["node_modules/.pnpm/lock.yaml"]

[tasks.biome]
description = "Lint and format with Biome"
[tasks.lint]
depends = ["install"]
description = "Lint and format the codebase"
usage = '''
flag "--write" help="Apply safe fixes and formatting in place"
arg "<paths>" var=#true default="." help="Files or directories to check (defaults to the whole repo)"
arg "<paths>" var=#true default="." help="Files or directories to lint (defaults to the whole repo)"
'''
run = "biome check ${usage_write:+--write} --no-errors-on-unmatched $usage_paths"

[tasks.verify]
description = "Typecheck and test every package"
depends = ["//...:typecheck", "//...:test"]
[tasks.check]
depends = ["install"]
description = "Run static checks on the codebase"
usage = 'arg "[package]" help="Package to check (defaults to all)"'
run = ['turbo run check ${usage_package:+--filter=$usage_package}']

[tasks.test]
depends = ["install"]
description = "Run tests on the codebase"
usage = 'arg "[package]" help="Package to test (defaults to all)"'
run = 'turbo run test ${usage_package:+--filter=$usage_package}'
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "packages",
"private": true,
"packageManager": "pnpm@11.9.0",
"devDependencies": {
"@plexus-ms/config": "workspace:*"
"@changesets/cli": "^2",
"@plexus-ms/config": "workspace:*",
"turbo": "^2"
}
}
11 changes: 0 additions & 11 deletions packages/std/mise.toml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/std/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"check": "tsc --noEmit",
"test": "node --test",
"prepack": "tsc"
},
Expand Down
Loading