WIP: --local project-scoped age gating#2
Draft
SmileyChris wants to merge 1 commit into
Draft
Conversation
Replace the inert .gestate.toml marker (written and read by gestate but
honored by no tool) with config the package managers actually enforce.
`set <days> --local` now writes each tool's committed-to-repo config in the
current directory, so the gate travels with the project and applies to
collaborators who never ran gestate:
npm -> .npmrc min-release-age (days)
pnpm -> pnpm-workspace.yaml minimumReleaseAge (minutes)
yarn -> .yarnrc.yml npmMinimalAgeGate (minutes)
bun -> bunfig.toml [install] minimumReleaseAge (seconds)
deno -> deno.json minimumDependencyAge (P<N>D)
uv -> uv.toml exclude-newer ("N days")
Only tools the repo gives evidence of (lockfile/manifest/existing config)
are configured, so it won't litter unrelated ecosystems. pip is skipped:
it has no per-project config. ini/yaml edits are line-based to preserve
comments and layout; a deno.json with comments (JSONC) is left untouched
with the line to add printed instead. `revert --local` removes the key and
deletes any file it leaves empty. `--local` with `--all` is now rejected.
Refs #1
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.
Fixes #1.
Status: WIP / draft.
What
gestate set <days> --localwrites each tool's native, committed-to-repo config in the current directory, so the minimum-release-age gate travels with the project and applies to anyone who clones it — including collaborators who never ran gestate.revert --localremoves it.This replaces the earlier
.gestate.tomlapproach (an inert marker that gestate wrote and read, but no tool honored — so it enforced nothing)..npmrcmin-release-age(days)pnpm-workspace.yamlminimumReleaseAge(minutes).yarnrc.ymlnpmMinimalAgeGate(minutes)bunfig.toml[install] minimumReleaseAge(seconds)deno.jsonminimumDependencyAge(P<N>D)uv.tomlexclude-newer("N days")Behavior
uv.tomlor a Python repo withbunfig.toml..npmrc/YAML edits are line-based (preserve layout). Adeno.jsonwith comments (JSONC) is left untouched; gestate prints the line to add.revert --localremoves the key and deletes any file it leaves empty, preserving foreign content.set --local --allis rejected (previously--allwas silently ignored).Tests
local.pyrewritten with full coverage (formats, round-trips, detection, revert, JSONC fallback) plus CLI-levelapply_local/revert_localtests. Full suite green (95), ruff clean.Open questions / follow-ups (not in this PR)
gestatenow renders a "Project settings" table, but the pre-existing no-TTY guard means it only shows in a real terminal — verified the path, not integration-tested.global.uploaded-prior-to, which research suggests isn't a real pip config key. If so, globalsetsilently no-ops for pip. Worth verifying independently.