diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 7e5d4dc..bf04628 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,7 +11,7 @@ jobs: permissions: contents: read # Allow reading the repository content - id-token: write # Required for provenance and JSR authentication + id-token: write # Required for Trusted Publishing, provenance and JSR container: image: node:24 @@ -101,8 +101,6 @@ jobs: echo "Stable release detected. Publishing to latest tag." npm publish --provenance fi - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # fallback if Trusted Publishing is not set up - name: Publish to JSR run: | diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f9021a8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +## chuchi 0.1.7 + +- **Breaking:** cookies default to `Path=/`, remove them with the path they + were set with (`remove(name, { path })`). +- Fixes for cookies, `SsrCache`, scroll restoration, hash links and `//` + paths in the router. + +## chuchi-utils 0.1.7 + +- Fixes for `range`, `searchScore` and `SlotArray.remove`. + +## chuchi-core 0.1.6 + +- Better errors for non-json responses, first JSR release. + +## chuchi-legacy 1.1.1 + +- `inViewY` fix, first JSR release. diff --git a/chuchi-core/jsr.json b/chuchi-core/jsr.json index f1db4f8..a7374a2 100644 --- a/chuchi-core/jsr.json +++ b/chuchi-core/jsr.json @@ -1,6 +1,6 @@ { "name": "@chuchi/core", - "version": "0.1.1", + "version": "0.1.6", "license": "MIT or Apache-2.0", "exports": { "./api/Api": "./src/api/Api.ts", diff --git a/chuchi-core/package.json b/chuchi-core/package.json index 7305182..72cd2bc 100644 --- a/chuchi-core/package.json +++ b/chuchi-core/package.json @@ -1,6 +1,6 @@ { "name": "chuchi-core", - "version": "0.1.5", + "version": "0.1.6", "author": "Sören Meier ", "type": "module", "scripts": { diff --git a/chuchi-legacy/jsr.json b/chuchi-legacy/jsr.json index e4eb49f..41d3592 100644 --- a/chuchi-legacy/jsr.json +++ b/chuchi-legacy/jsr.json @@ -1,12 +1,14 @@ { "name": "@chuchi/legacy", - "version": "1.0.2", + "version": "1.1.1", "license": "MIT or Apache-2.0", "exports": { "./time/Date": "./src/time/Date.ts", "./time/DateTime": "./src/time/DateTime.ts", "./time/DateTimeRange": "./src/time/DateTimeRange.ts", "./time/Duration": "./src/time/Duration.ts", - "./time/localization": "./src/time/localization.ts" + "./time/localization": "./src/time/localization.ts", + "./dom/Context2d": "./src/dom/Context2d.ts", + "./dom/utils": "./src/dom/utils.ts" } } diff --git a/chuchi-legacy/package.json b/chuchi-legacy/package.json index dbaef98..1517688 100644 --- a/chuchi-legacy/package.json +++ b/chuchi-legacy/package.json @@ -1,6 +1,6 @@ { "name": "chuchi-legacy", - "version": "1.1.0", + "version": "1.1.1", "author": "Sören Meier ", "type": "module", "scripts": { diff --git a/chuchi-legacy/src/dom/utils.ts b/chuchi-legacy/src/dom/utils.ts index 61f9f8b..f7dd63b 100644 --- a/chuchi-legacy/src/dom/utils.ts +++ b/chuchi-legacy/src/dom/utils.ts @@ -1,5 +1,5 @@ // create element -export function c(el: any, attrs: Record = {}) { +export function c(el: any, attrs: Record = {}): any { el = document.createElement(el); Object.entries(attrs).forEach(([key, val]) => { switch (key) { @@ -30,7 +30,7 @@ export class CustomEl { } // append child -export function a(to: Element, ...els: any[]) { +export function a(to: Element, ...els: any[]): Element { els.forEach(el => { if (!el) return; @@ -64,13 +64,13 @@ export function ct(to: Element, className: string, cond: boolean = null) { } // returns { x, y } -export function offset(el: Element) { +export function offset(el: Element): { x: number; y: number } { const { left, top } = el.getBoundingClientRect(); return { x: left, y: top }; } // left right is ignored -export function inViewY(el: Element) { +export function inViewY(el: Element): boolean { const wHeight = window.innerHeight; const { top, bottom } = el.getBoundingClientRect(); @@ -79,12 +79,12 @@ export function inViewY(el: Element) { } // name --my-var -export function cssVar(name: string, el: Element = null) { +export function cssVar(name: string, el: Element = null): string { if (!el) el = document.documentElement; return getComputedStyle(el).getPropertyValue(name); } -export function fontSize(el: Element = null) { +export function fontSize(el: Element = null): number { if (!el) el = document.documentElement; return parseFloat(getComputedStyle(el).fontSize); } diff --git a/chuchi-utils/jsr.json b/chuchi-utils/jsr.json index 0661dfa..ccdef2c 100644 --- a/chuchi-utils/jsr.json +++ b/chuchi-utils/jsr.json @@ -1,6 +1,6 @@ { "name": "@chuchi/utils", - "version": "0.1.6", + "version": "0.1.7", "license": "MIT or Apache-2.0", "exports": { ".": "./src/index.ts", diff --git a/chuchi-utils/package.json b/chuchi-utils/package.json index b15c646..fd38705 100644 --- a/chuchi-utils/package.json +++ b/chuchi-utils/package.json @@ -1,6 +1,6 @@ { "name": "chuchi-utils", - "version": "0.1.6", + "version": "0.1.7", "author": "Sören Meier ", "type": "module", "scripts": { diff --git a/chuchi/jsr.json b/chuchi/jsr.json index b66c350..00f9110 100644 --- a/chuchi/jsr.json +++ b/chuchi/jsr.json @@ -1,10 +1,12 @@ { "name": "@chuchi/chuchi", - "version": "0.1.6", + "version": "0.1.7", "license": "MIT or Apache-2.0", "exports": { ".": "./src/index.ts", "./ssr": "./src/ssr/index.ts", - "./stores": "./src/stores/index.ts" + "./stores": "./src/stores/index.ts", + "./api": "./src/api.ts", + "./cookies": "./src/cookies/index.ts" } } diff --git a/chuchi/package.json b/chuchi/package.json index d3337a6..f433751 100644 --- a/chuchi/package.json +++ b/chuchi/package.json @@ -1,6 +1,6 @@ { "name": "chuchi", - "version": "0.1.6", + "version": "0.1.7", "author": "Sören Meier ", "type": "module", "scripts": { diff --git a/package-lock.json b/package-lock.json index 4988023..4a27fa8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ } }, "chuchi": { - "version": "0.1.6", + "version": "0.1.7", "license": "MIT or Apache-2.0", "dependencies": { "chuchi-core": "^0.1.0", @@ -37,7 +37,7 @@ } }, "chuchi-core": { - "version": "0.1.5", + "version": "0.1.6", "license": "MIT or Apache-2.0", "dependencies": { "chuchi-utils": "^0.1.0" @@ -48,7 +48,7 @@ } }, "chuchi-legacy": { - "version": "1.1.0", + "version": "1.1.1", "license": "MIT or Apache-2.0", "dependencies": { "chuchi-utils": "^0.1.0" @@ -59,7 +59,7 @@ } }, "chuchi-utils": { - "version": "0.1.6", + "version": "0.1.7", "license": "MIT or Apache-2.0", "devDependencies": { "tslib": "^2.6.2",