From c525437ed65b10b7cdeae93275e5be52def9d5cd Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 22 Mar 2026 01:28:30 +0000 Subject: [PATCH] refactor(module): migrate module path from forge.lthn.ai to dappco.re Update module path from forge.lthn.ai/core/go-html to dappco.re/go/core/html. Migrate all .go import paths, update dependency versions (core v0.5.0, log v0.1.0, io v0.2.0), and add replace directives for local development. Co-Authored-By: Virgil --- .gitignore | 5 +++-- CLAUDE.md | 7 ++++--- bench_test.go | 2 +- cmd/codegen/main.go | 4 ++-- cmd/wasm/main.go | 2 +- cmd/wasm/register.go | 4 ++-- cmd/wasm/size_test.go | 2 +- codegen/codegen.go | 2 +- context.go | 2 +- edge_test.go | 2 +- go.mod | 20 ++++++++++++++------ go.sum | 10 ++-------- integration_test.go | 2 +- node.go | 2 +- node_test.go | 2 +- pipeline.go | 2 +- pipeline_test.go | 2 +- render_test.go | 2 +- 18 files changed, 39 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 2c045df..cdc6f76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -dist/ -.core/ .idea/ +.vscode/ +*.log +.core/ diff --git a/CLAUDE.md b/CLAUDE.md index 2594f0b..53333f7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. -Agent instructions for `go-html`. Module path: `forge.lthn.ai/core/go-html` +Agent instructions for `go-html`. Module path: `dappco.re/go/core/html` ## Commands @@ -40,8 +40,9 @@ Files guarded with `//go:build !js` are excluded from WASM: ## Dependencies -- `forge.lthn.ai/core/go-i18n` (replace directive → `../go-i18n`) -- `forge.lthn.ai/core/go-inference` (indirect, via go-i18n) +- `dappco.re/go/core/i18n` (replace directive → local go-i18n) +- `forge.lthn.ai/core/go-inference` (indirect, via go-i18n; not yet migrated) +- `forge.lthn.ai/core/go-log` (indirect, via go-i18n; not yet migrated) - Both `go-i18n` and `go-inference` must be cloned alongside this repo for builds - Go 1.26+ required (uses `range` over integers, `iter.Seq`, `maps.Keys`, `slices.Collect`) diff --git a/bench_test.go b/bench_test.go index 63e6ab5..220363e 100644 --- a/bench_test.go +++ b/bench_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) func init() { diff --git a/cmd/codegen/main.go b/cmd/codegen/main.go index 85bd76b..b72def3 100644 --- a/cmd/codegen/main.go +++ b/cmd/codegen/main.go @@ -11,8 +11,8 @@ import ( goio "io" "os" - "forge.lthn.ai/core/go-html/codegen" - log "forge.lthn.ai/core/go-log" + "dappco.re/go/core/html/codegen" + log "dappco.re/go/core/log" ) func run(r goio.Reader, w goio.Writer) error { diff --git a/cmd/wasm/main.go b/cmd/wasm/main.go index 254f08d..a3c0db2 100644 --- a/cmd/wasm/main.go +++ b/cmd/wasm/main.go @@ -5,7 +5,7 @@ package main import ( "syscall/js" - html "forge.lthn.ai/core/go-html" + html "dappco.re/go/core/html" ) // renderToString builds an HLCRF layout from JS arguments and returns HTML. diff --git a/cmd/wasm/register.go b/cmd/wasm/register.go index 543a178..d88c866 100644 --- a/cmd/wasm/register.go +++ b/cmd/wasm/register.go @@ -5,8 +5,8 @@ package main import ( "encoding/json" - "forge.lthn.ai/core/go-html/codegen" - log "forge.lthn.ai/core/go-log" + "dappco.re/go/core/html/codegen" + log "dappco.re/go/core/log" ) // buildComponentJS takes a JSON slot map and returns the WC bundle JS string. diff --git a/cmd/wasm/size_test.go b/cmd/wasm/size_test.go index 5552844..ed759c1 100644 --- a/cmd/wasm/size_test.go +++ b/cmd/wasm/size_test.go @@ -11,7 +11,7 @@ import ( "path/filepath" "testing" - coreio "forge.lthn.ai/core/go-io" + coreio "dappco.re/go/core/io" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/codegen/codegen.go b/codegen/codegen.go index b2e81f5..8692b0b 100644 --- a/codegen/codegen.go +++ b/codegen/codegen.go @@ -5,7 +5,7 @@ import ( "strings" "text/template" - log "forge.lthn.ai/core/go-log" + log "dappco.re/go/core/log" ) // wcTemplate is the Web Component class template. diff --git a/context.go b/context.go index 19cddfb..3bc77ef 100644 --- a/context.go +++ b/context.go @@ -1,6 +1,6 @@ package html -import i18n "forge.lthn.ai/core/go-i18n" +import i18n "dappco.re/go/core/i18n" // Context carries rendering state through the node tree. type Context struct { diff --git a/edge_test.go b/edge_test.go index c1f5e83..9ff9055 100644 --- a/edge_test.go +++ b/edge_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) // --- Unicode / RTL edge cases --- diff --git a/go.mod b/go.mod index 453eca5..af2ee05 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,27 @@ -module forge.lthn.ai/core/go-html +module dappco.re/go/core/html go 1.26.0 require ( - forge.lthn.ai/core/go-i18n v0.1.8 - forge.lthn.ai/core/go-io v0.1.6 - forge.lthn.ai/core/go-log v0.0.4 + dappco.re/go/core/i18n v0.1.8 + dappco.re/go/core/io v0.2.0 + dappco.re/go/core/log v0.1.0 github.com/stretchr/testify v1.11.1 ) require ( - forge.lthn.ai/core/go v0.3.3 // indirect - forge.lthn.ai/core/go-inference v0.1.7 // indirect + dappco.re/go/core v0.5.0 // indirect + forge.lthn.ai/core/go-inference v0.1.4 // indirect + forge.lthn.ai/core/go-log v0.0.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect golang.org/x/text v0.35.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace ( + dappco.re/go/core => ../../../../core/go + dappco.re/go/core/i18n => ../../../../core/go-i18n + dappco.re/go/core/io => ../../../../core/go-io + dappco.re/go/core/log => ../../../../core/go-log +) diff --git a/go.sum b/go.sum index c50e040..899aa9b 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,5 @@ -forge.lthn.ai/core/go v0.3.3 h1:kYYZ2nRYy0/Be3cyuLJspRjLqTMxpckVyhb/7Sw2gd0= -forge.lthn.ai/core/go v0.3.3/go.mod h1:Cp4ac25pghvO2iqOu59t1GyngTKVOzKB5/VPdhRi9CQ= -forge.lthn.ai/core/go-i18n v0.1.8 h1:+G/w5KVmu9NUoS//fRUseBKHQO+sNeB+RSlmhlz7OYM= -forge.lthn.ai/core/go-i18n v0.1.8/go.mod h1:4IdsNILKU7nVSJf8gEjD+Iu2YfqpM0hrRNJFclPJI/k= -forge.lthn.ai/core/go-inference v0.1.7 h1:9Dy6v03jX5ZRH3n5iTzlYyGtucuBIgSe+S7GWvBzx9Q= -forge.lthn.ai/core/go-inference v0.1.7/go.mod h1:jfWz+IJX55wAH98+ic6FEqqGB6/P31CHlg7VY7pxREw= -forge.lthn.ai/core/go-io v0.1.6 h1:RByYeP829HFqR2yLg5iBM5dGHKzPFYc+udl/Y1DZIRs= -forge.lthn.ai/core/go-io v0.1.6/go.mod h1:3MSuQZuzhCi6aefECQ/LxhM8ooVLam1KgEvgeEjYZVc= +forge.lthn.ai/core/go-inference v0.1.4 h1:fuAgWbqsEDajHniqAKyvHYbRcBrkGEiGSqR2pfTMRY0= +forge.lthn.ai/core/go-inference v0.1.4/go.mod h1:jfWz+IJX55wAH98+ic6FEqqGB6/P31CHlg7VY7pxREw= forge.lthn.ai/core/go-log v0.0.4 h1:KTuCEPgFmuM8KJfnyQ8vPOU1Jg654W74h8IJvfQMfv0= forge.lthn.ai/core/go-log v0.0.4/go.mod h1:r14MXKOD3LF/sI8XUJQhRk/SZHBE7jAFVuCfgkXoZPw= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= diff --git a/integration_test.go b/integration_test.go index 38c2da3..1a6346c 100644 --- a/integration_test.go +++ b/integration_test.go @@ -3,7 +3,7 @@ package html import ( "testing" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) func TestIntegration_RenderThenReverse(t *testing.T) { diff --git a/node.go b/node.go index 54a359c..f47ee36 100644 --- a/node.go +++ b/node.go @@ -7,7 +7,7 @@ import ( "slices" "strings" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) // Node is anything renderable. diff --git a/node_test.go b/node_test.go index 002911d..8230fbd 100644 --- a/node_test.go +++ b/node_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) func TestRawNode_Render(t *testing.T) { diff --git a/pipeline.go b/pipeline.go index 0fcdcb4..c400dd3 100644 --- a/pipeline.go +++ b/pipeline.go @@ -5,7 +5,7 @@ package html import ( "strings" - "forge.lthn.ai/core/go-i18n/reversal" + "dappco.re/go/core/i18n/reversal" ) // StripTags removes HTML tags from rendered output, returning plain text. diff --git a/pipeline_test.go b/pipeline_test.go index 46ae676..c896859 100644 --- a/pipeline_test.go +++ b/pipeline_test.go @@ -5,7 +5,7 @@ package html import ( "testing" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) func TestStripTags_Simple(t *testing.T) { diff --git a/render_test.go b/render_test.go index 083ee1c..02ebb8e 100644 --- a/render_test.go +++ b/render_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - i18n "forge.lthn.ai/core/go-i18n" + i18n "dappco.re/go/core/i18n" ) func TestRender_FullPage(t *testing.T) {