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

Function touchTimestamp

scripts/update.js:20–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected