MCPcopy Create free account
hub / github.com/alibaba/open-code-review / touchTimestamp

Function touchTimestamp

scripts/update.js:25–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23const DEFAULT_REGISTRY = "https://registry.npmjs.org";
24
25function touchTimestamp() {
26 fs.mkdirSync(stateDir, { recursive: true });
27 const now = new Date();
28 try {
29 fs.utimesSync(tsFile, now, now);
30 } catch (_) {
31 fs.writeFileSync(tsFile, now.toISOString());
32 }
33}
34
35function acquireLock() {
36 fs.mkdirSync(stateDir, { recursive: true });

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected