MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / isAutoUpdatableSpec

Function isAutoUpdatableSpec

lib/update.ts:111–119  ·  view source on GitHub ↗
(spec: string)

Source from the content-addressed store, hash-verified

109}
110
111export function isAutoUpdatableSpec(spec: string) {
112 const value = spec.trim()
113 if (!value) return false
114 if (value === "latest" || value === "*") return true
115 if (/^[~^]/.test(value)) return true
116 if (/^(?:>=|>|<=|<)/.test(value)) return true
117 if (/\s+(?:\|\||-|[<>=])\s+/.test(value)) return true
118 return false
119}
120
121async function readPackageJson(path: string): Promise<PackageJson | undefined> {
122 try {

Callers 2

update.test.tsFile · 0.90
updateRemoveDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected