From 4405ad54e56948fd429bb3644fea3c57543f1d38 Mon Sep 17 00:00:00 2001 From: Joe Sweeney Date: Sat, 26 Oct 2024 23:44:24 -0600 Subject: [PATCH] version 0.7.0 --- .github/workflows/publish.yml | 2 +- deno.json | 5 +++-- deno.lock | 12 +++++++++--- scripts/build_npm.ts | 5 ++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7516c0f..c1eada3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: with: deno-version: "2.0.0" - name: Build NPM Package - run: deno run -A scripts/build_npm.ts ${{ github.event.release.tag_name }} + run: deno run -A scripts/build_npm.ts - name: Publish to NPM run: cd npm && npm publish --provenance env: diff --git a/deno.json b/deno.json index 69b6ad3..7baa9ce 100644 --- a/deno.json +++ b/deno.json @@ -1,8 +1,9 @@ { "name": "@jcs224/hono-sessions", - "version": "0.6.1", + "version": "0.7.0", "exports": "./mod.ts", "imports": { - "@deno/dnt": "jsr:@deno/dnt@^0.41.3" + "@deno/dnt": "jsr:@deno/dnt@^0.41.3", + "@std/path": "jsr:@std/path@^1.0.7" } } diff --git a/deno.lock b/deno.lock index a219659..cecc04a 100644 --- a/deno.lock +++ b/deno.lock @@ -13,10 +13,12 @@ "jsr:@std/fs@1": "1.0.4", "jsr:@std/fs@~0.229.3": "0.229.3", "jsr:@std/io@0.223": "0.223.0", + "jsr:@std/path@*": "1.0.6", "jsr:@std/path@0.223": "0.223.0", - "jsr:@std/path@1": "1.0.6", + "jsr:@std/path@1": "1.0.7", "jsr:@std/path@1.0.0-rc.1": "1.0.0-rc.1", - "jsr:@std/path@^1.0.6": "1.0.6", + "jsr:@std/path@^1.0.6": "1.0.7", + "jsr:@std/path@^1.0.7": "1.0.7", "jsr:@std/path@~0.225.2": "0.225.2", "jsr:@ts-morph/bootstrap@0.24": "0.24.0", "jsr:@ts-morph/common@0.24": "0.24.0", @@ -104,6 +106,9 @@ "@std/path@1.0.6": { "integrity": "ab2c55f902b380cf28e0eec501b4906e4c1960d13f00e11cfbcd21de15f18fed" }, + "@std/path@1.0.7": { + "integrity": "76a689e07f0e15dcc6002ec39d0866797e7156629212b28f27179b8a5c3b33a1" + }, "@ts-morph/bootstrap@0.24.0": { "integrity": "a826a2ef7fa8a7c3f1042df2c034d20744d94da2ee32bf29275bcd4dffd3c060", "dependencies": [ @@ -291,7 +296,8 @@ }, "workspace": { "dependencies": [ - "jsr:@deno/dnt@~0.41.3" + "jsr:@deno/dnt@~0.41.3", + "jsr:@std/path@^1.0.7" ] } } diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 2bdbdb1..3693d69 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -1,5 +1,8 @@ // ex. scripts/build_npm.ts import { build, emptyDir } from "@deno/dnt"; +import { fromFileUrl, dirname } from '@std/path' + +const version = JSON.parse(await Deno.readTextFile(dirname(fromFileUrl(import.meta.url)) + '/../deno.json')).version await emptyDir("./npm"); @@ -17,7 +20,7 @@ await build({ package: { // package.json properties name: "hono-sessions", - version: Deno.args[0]?.replace('v', ''), + version, description: "Cookie-based sessions for Hono web framework", license: "MIT", repository: {