diff --git a/.changeset/pre.json b/.changeset/pre.json index be9774ee..8ba8ef5d 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -3,14 +3,12 @@ "tag": "beta", "initialVersions": { "docs": "0.0.0", - "@hwy-js/build": "0.4.0-beta.33", - "hwy": "0.4.0-beta.33", - "create-hwy": "0.4.0-beta.33", - "@hwy-js/dev": "0.4.0-beta.33", + "@hwy-js/build": "0.4.0-beta.34", + "hwy": "0.4.0-beta.34", + "create-hwy": "0.4.0-beta.34", + "@hwy-js/dev": "0.4.0-beta.34", "cf-pages-tester": "0.0.0", "tester": "0.0.0" }, - "changesets": [ - "rotten-boxes-watch" - ] + "changesets": ["rotten-boxes-watch", "three-cooks-fold"] } diff --git a/.changeset/three-cooks-fold.md b/.changeset/three-cooks-fold.md new file mode 100644 index 00000000..3b871117 --- /dev/null +++ b/.changeset/three-cooks-fold.md @@ -0,0 +1,6 @@ +--- +"create-hwy": patch +"@hwy-js/build": patch +--- + +tweak build step, auto read latest version in create-hwy diff --git a/CHANGESETS-DIRECTIONS.md b/CHANGESETS-DIRECTIONS.md index 4bd263bd..fd3efb81 100644 --- a/CHANGESETS-DIRECTIONS.md +++ b/CHANGESETS-DIRECTIONS.md @@ -5,7 +5,10 @@ https://github.com/changesets/changesets/blob/main/docs/prereleases.md ```sh pnpm changeset pre enter beta pnpm changeset version +pnpm build pnpm changeset publish +git add . +git commit -am "whatever" git push --follow-tags pnpm changeset pre exit ``` diff --git a/docs/package.json b/docs/package.json index 7e7e93c5..b91b8eee 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,11 +13,11 @@ "@hono/node-server": "^1.2.0", "highlight.js": "^11.8.0", "hono": "^3.7.5", - "hwy": "0.4.0-beta.34" + "hwy": "0.4.0-beta.35" }, "devDependencies": { - "@hwy-js/build": "0.4.0-beta.34", - "@hwy-js/dev": "0.4.0-beta.34", + "@hwy-js/build": "0.4.0-beta.35", + "@hwy-js/dev": "0.4.0-beta.35", "@types/node": "^20.8.3", "@types/nprogress": "^0.2.1", "htmx.org": "^1.9.6", diff --git a/packages/build/CHANGELOG.md b/packages/build/CHANGELOG.md index 5ef13e76..ccb761ba 100644 --- a/packages/build/CHANGELOG.md +++ b/packages/build/CHANGELOG.md @@ -1,5 +1,11 @@ # @hwy-js/build +## 0.4.0-beta.35 + +### Patch Changes + +- tweak build step, auto read latest version in create-hwy + ## 0.4.0-beta.34 ### Patch Changes diff --git a/packages/build/package.json b/packages/build/package.json index b501f2ff..cbc25579 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -1,6 +1,6 @@ { "name": "@hwy-js/build", - "version": "0.4.0-beta.34", + "version": "0.4.0-beta.35", "author": { "name": "Samuel J. Cook" }, diff --git a/packages/build/src/run-build-tasks.ts b/packages/build/src/run-build-tasks.ts index 6c2fbb2e..35e5c124 100644 --- a/packages/build/src/run-build-tasks.ts +++ b/packages/build/src/run-build-tasks.ts @@ -75,7 +75,8 @@ async function runBuildTasks({ log, isDev }: { isDev: boolean; log?: string }) { if (is_first_run) { is_first_run = false; - if (fs.existsSync(dist_path)) { + // look for a hwy-specific file that indicates a previous build + if (fs.existsSync(path.join(dist_path, "public-reverse-map.js"))) { hwyLog("Removing old dist folder..."); fs.rmSync(dist_path, { recursive: true, force: true }); } diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index bc1356b2..23a54b83 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,7 @@ # hwy +## 0.4.0-beta.35 + ## 0.4.0-beta.34 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 8a104499..93b5431b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "hwy", - "version": "0.4.0-beta.34", + "version": "0.4.0-beta.35", "author": { "name": "Samuel J. Cook" }, diff --git a/packages/create-hwy/CHANGELOG.md b/packages/create-hwy/CHANGELOG.md index 75cc57d1..aa9dc434 100644 --- a/packages/create-hwy/CHANGELOG.md +++ b/packages/create-hwy/CHANGELOG.md @@ -1,5 +1,11 @@ # create-hwy +## 0.4.0-beta.35 + +### Patch Changes + +- tweak build step, auto read latest version in create-hwy + ## 0.4.0-beta.34 ### Patch Changes diff --git a/packages/create-hwy/package.json b/packages/create-hwy/package.json index c35a88f0..78297040 100644 --- a/packages/create-hwy/package.json +++ b/packages/create-hwy/package.json @@ -1,6 +1,6 @@ { "name": "create-hwy", - "version": "0.4.0-beta.34", + "version": "0.4.0-beta.35", "author": { "name": "Samuel J. Cook" }, diff --git a/packages/create-hwy/src/get-package-json.ts b/packages/create-hwy/src/get-package-json.ts index f1a07f33..8f0ffed2 100644 --- a/packages/create-hwy/src/get-package-json.ts +++ b/packages/create-hwy/src/get-package-json.ts @@ -1,9 +1,14 @@ import { DEFAULT_PORT } from "../../common/index.mjs"; import type { Options } from "../index.js"; import { get_is_target_deno } from "./utils.js"; +import fs from "node:fs"; + +const latest_hwy_version = JSON.parse( + fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8"), +).version; const VERSIONS = { - HWY: "^0.4.0-beta.33", + HWY: `^${latest_hwy_version}`, HONO_NODE_SERVER: "^1.2.0", HONO: "^3.7.5", HTMX: "^1.9.6", diff --git a/packages/dev/CHANGELOG.md b/packages/dev/CHANGELOG.md index ba8c9e88..ec176317 100644 --- a/packages/dev/CHANGELOG.md +++ b/packages/dev/CHANGELOG.md @@ -1,5 +1,7 @@ # @hwy-js/dev +## 0.4.0-beta.35 + ## 0.4.0-beta.34 ### Patch Changes diff --git a/packages/dev/package.json b/packages/dev/package.json index 570df1ce..2f58c5c8 100644 --- a/packages/dev/package.json +++ b/packages/dev/package.json @@ -1,6 +1,6 @@ { "name": "@hwy-js/dev", - "version": "0.4.0-beta.34", + "version": "0.4.0-beta.35", "author": { "name": "Samuel J. Cook" },