Skip to content

Commit

Permalink
Update dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 20, 2024
1 parent 6452a8f commit ca36804
Show file tree
Hide file tree
Showing 6 changed files with 1,266 additions and 1,129 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
name: Release On Tag
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Extract the changelog
id: changelog
run: |
TAG_NAME=${GITHUB_REF/refs\/tags\//}
READ_SECTION=false
CHANGELOG=""
while IFS= read -r line; do
if [[ "$line" =~ ^#+\ +(.*) ]]; then
if [[ "${BASH_REMATCH[1]}" == "$TAG_NAME" ]]; then
READ_SECTION=true
elif [[ "$READ_SECTION" == true ]]; then
break
fi
elif [[ "$READ_SECTION" == true ]]; then
CHANGELOG+="$line"$'\n'
fi
done < "CHANGELOG.md"
CHANGELOG=$(echo "$CHANGELOG" | awk '/./ {$1=$1;print}')
echo "changelog_content<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create the release
if: steps.changelog.outputs.changelog_content != ''
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
body: '${{ steps.changelog.outputs.changelog_content }}'
draft: false
prerelease: false
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'preact/hooks'
import { listenKeys } from 'nanostores'
import { useEffect, useState } from 'preact/hooks'

export function useStore(store, opts = {}) {
let [, forceRender] = useState({})
Expand Down
63 changes: 37 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
"preact"
],
"scripts": {
"unit": "tsm node_modules/uvu/bin.js . '\\.test\\.(ts|js)$'",
"test": "c8 pnpm unit && eslint . && check-dts && size-limit"
"test:lint": "eslint .",
"test:coverage": "c8 pnpm bnt",
"test:types": "check-dts",
"test:size": "size-limit",
"test": "pnpm run /^test:/"
},
"author": "Andrey Sitnik <[email protected]>",
"license": "MIT",
Expand All @@ -36,31 +39,33 @@
"preact": ">=10.0.0"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@logux/eslint-config": "^50.0.0",
"@size-limit/preset-small-lib": "^8.2.4",
"@babel/core": "^7.23.9",
"@logux/eslint-config": "^52.0.2",
"@size-limit/preset-small-lib": "^11.0.2",
"@testing-library/preact": "^3.2.3",
"@types/node": "^20.2.3",
"@types/ws": "^8.5.4",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"c8": "^7.13.0",
"@types/node": "^20.11.19",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"better-node-test": "^0.5.0",
"c8": "^9.1.0",
"check-dts": "^0.7.2",
"clean-publish": "^4.2.0",
"eslint": "^8.41.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^16.0.0",
"eslint": "^8.56.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node-import": "^1.0.4",
"eslint-plugin-perfectionist": "^2.5.0",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1",
"happy-dom": "^9.20.3",
"happy-dom": "^13.3.8",
"nanodelay": "^2.0.2",
"nanostores": "^0.9.0",
"preact": "^10.15.0",
"size-limit": "^8.2.4",
"tsm": "^2.3.0",
"typescript": "^5.0.4",
"uvu": "^0.5.6"
"nanostores": "^0.10.0",
"preact": "^10.19.5",
"size-limit": "^11.0.2",
"tsx": "^4.7.1",
"typescript": "^5.3.3"
},
"prettier": {
"arrowParens": "avoid",
Expand All @@ -72,14 +77,20 @@
},
"c8": {
"exclude": [
"**/*.test.*"
"**/*.test.*",
"test/*"
],
"lines": 100,
"reporter": "lcov",
"check-coverage": true
"check-coverage": true,
"reporter": [
"text",
"lcov"
],
"skip-full": true,
"clean": true
},
"eslintConfig": {
"extends": "@logux/eslint-config/esm",
"extends": "@logux/eslint-config",
"rules": {
"@typescript-eslint/unified-signatures": "off",
"@typescript-eslint/no-explicit-any": "off",
Expand All @@ -94,7 +105,7 @@
"index.js": "{ useStore }",
"nanostores": "{ map, computed }"
},
"limit": "962 B"
"limit": "957 B"
}
]
}
Loading

0 comments on commit ca36804

Please sign in to comment.