Repository navigation
refactor(module): move Go module root to repo root with pkg/ subpackages - #1258
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the Go module entry (
go.mod,go.sum, rootpackage game,cmd/, andinternal/) frompackages/game/to the repository root, while organizing all 83 library subpackages underpkg/(github.com/nsgo-dev/game/pkg/<name>) instead of flattening them into the root directory.go get github.com/nsgo-dev/game@v0.1.0and clean root release tagsv0.1.0instead ofpackages/game/v0.1.0.package game,cmd/,internal/, and top-level repo folders; all library packages live underpkg/.docs/en&docs/zh), API reference generation (cmd/gameapi), JSON schema generation (cmd/gameschema),skills/nsgo-game,changelog.d/root-module-pkg-layout.md, and.agents/notes/implemented/architecture/2026-11-27-root-module-pkg-layout.md.*.test.ts→*.spec.ts: preventsgo tool nsgo test .at the root from picking up Bun tests as NSGo TSX tests while keepingbun testdiscovering all 24 tests..github/workflows/test.yml'stemplatesjob temporarily pinsgithub.com/nsgo-dev/gameto$GITHUB_WORKSPACEunderGOWORK=offuntilv0.1.0is tagged at the root after this PR merges; a follow-up PR will pin all 16template/**/go.mod.tmplfiles tov0.1.0and remove the temporary replacement.Verification
go tool nsgo test .(5,837/5,838 passed in full run;TestZshCompletionpassed standalone in 23.2s)go tool nsgo check -target macos,windows,linux,android,web,ios,ios_simulatorgo run ./cmd/gameschema -checkgo run ./cmd/game check examplesgo tool nsgo test .intools/agenteval,tools/changelog, and all 7 examples (caverun,lantern3d,cryptquest,slidegem,starburst,tutorial,fieldmedic)apps/website:bun run test(24/24),bun run build(130 packages, 325,280 API anchors on 1,300 pages, Pagefind),bun run typecheckgo run ./tools/changelog check,bun run verify-notes,actionlint,gofmt -l .,git diff --check