Skip to content

Commit

Permalink
chore: release formgator to jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
GauBen committed Nov 8, 2024
1 parent 64d75b9 commit 9bd80cd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-rings-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"formgator": patch
---

Release formgator to JSR: https://jsr.io/@gauben/formgator
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
permissions:
contents: write
pull-requests: write
id-token: write # Used for authentication with JSR
steps:
- uses: actions/checkout@v4
- uses: pkgxdev/dev@v0
Expand All @@ -21,7 +22,12 @@ jobs:
uses: changesets/action@v1
with:
title: "chore: release packages"
publish: yarn release
publish: yarn build && yarn dlx @changesets/cli@2 publish
version: |
yarn dlx @changesets/cli@2 version && \
yarn node -e 'fs.writeFileSync("jsr.json", fs.readFileSync("jsr.json", "utf-8").replace(/"version": ".+"/, `"version": "${process.env.npm_package_version}"`))' && \
git add jsr.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: yarn dlx jsr publish
13 changes: 13 additions & 0 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
"name": "@gauben/formgator",
"version": "0.0.15",
"exports": {
".": "./src/index.ts",
"./sveltekit": "./src/sveltekit/index.ts"
},
"publish": {
"include": ["LICENSE", "README.md", "src/"],
"exclude": ["src/**/*.test.ts"]
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"check": "yarn workspaces foreach -W run check",
"dev": "pkgroll --sourcemap --watch",
"lint": "biome check --fix",
"release": "yarn build && yarn dlx @changesets/cli@2 publish",
"test": "tsc --noEmit && tsx --experimental-test-coverage --experimental-test-isolation=none --test-coverage-exclude='src/**/*.test.ts' --test-coverage-branches=100 --test 'src/**/*.test.ts'"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ const stringifyRegex = (regex: RegExp) => {
*
* This feature is considered experimental and may be removed in the future.
*/
export function splat(attributes: FormInput["attributes"]) {
export function splat(
attributes: FormInput["attributes"],
): Record<string, string | number | boolean | undefined> {
return Object.fromEntries(
Object.entries(attributes)
.filter(([, value]) => value !== false && value !== undefined)
Expand Down

0 comments on commit 9bd80cd

Please sign in to comment.