Repository navigation
build: keep node_modules out of the Go module - #185
Merged
Merged
Conversation
npm dependencies may ship Go sources: flatted, pulled in by eslint, carries flatted/golang/pkg/flatted/flatted.go. After npm install in editors/vscode, go list ./... reported it as a package of this module, so go build/vet/test compiled it, make lint failed with two govet findings in it, and make test failed in TestGolangciLint. CI never ran npm install in the Go jobs, so only contributors hit it. Add `ignore node_modules` to go.mod. The bare form matches the directory at any depth (./node_modules matches only the root), and removes it from ./... for every go command, golangci-lint included. Also list node_modules in .golangci.yml exclusions.paths, beside vendor/dist/site, so the linter config states the same scope. TestGoModIgnoresNodeModules reads go.mod through go mod edit -json and fails if the directive goes missing. Spec: specs/go-ignore-node-modules.md Signed-off-by: Jose Alekhinne <jose@ctx.ist>
bilersan
added a commit
to bilersan/ctx
that referenced
this pull request
Oct 8, 2026
Brings in ActiveMemory#184 (vitest 5, Node 22, vitest.config.ts -> .mts), ActiveMemory#185-ActiveMemory#189 and PR ActiveMemory#177. Git applied the branch's md-as-text plugin to the renamed vitest.config.mts; no conflicts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Ersan Bilik <ersanbilik@gmail.com>
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.
npm dependencies may ship Go sources: flatted, pulled in by eslint,
carries flatted/golang/pkg/flatted/flatted.go. After npm install in
editors/vscode, go list ./... reported it as a package of this
module, so go build/vet/test compiled it, make lint failed with two
govet findings in it, and make test failed in TestGolangciLint. CI
never ran npm install in the Go jobs, so only contributors hit it.
Add
ignore node_modulesto go.mod. The bare form matches thedirectory at any depth (./node_modules matches only the root), and
removes it from ./... for every go command, golangci-lint included.
Also list node_modules in .golangci.yml exclusions.paths, beside
vendor/dist/site, so the linter config states the same scope.
TestGoModIgnoresNodeModules reads go.mod through go mod edit -json
and fails if the directive goes missing.
Spec: specs/go-ignore-node-modules.md