MCPcopy Create free account
hub / github.com/EvoMap/evolver / makeVersionlessDegit

Function makeVersionlessDegit

test/forceUpdateFailureCodes.test.js:164–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162// `tmpPkg.version` is falsy -> download_incomplete (a malformed/incomplete
163// download, distinct from a present-but-wrong-version tag mismatch).
164function makeVersionlessDegit() {
165 return function (bin, args) {
166 if (!String(bin).includes('npx')) throw new Error('unexpected fallback call');
167 const tmpTarget = args[args.length - 1];
168 fs.mkdirSync(tmpTarget, { recursive: true });
169 fs.writeFileSync(
170 path.join(tmpTarget, 'package.json'),
171 JSON.stringify({ name: '@evomap/evolver' }),
172 'utf8',
173 );
174 fs.writeFileSync(path.join(tmpTarget, 'index.js'), '// no version', 'utf8');
175 };
176}
177
178describe('executeForceUpdate: structured failure taxonomy', () => {
179 before(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected