MCPcopy Create free account
hub / github.com/effect-app/libs / workspaceVersions

Function workspaceVersions

scripts/stagePublishPackage.mjs:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const packageJsonPath = _path.join(cwd, "package.json")
12
13const workspaceVersions = () => {
14 const versions = new Map()
15 for (const dirent of _fs.readdirSync(_path.join(rootDir, "packages"), { withFileTypes: true })) {
16 if (!dirent.isDirectory()) continue
17
18 const path = _path.join(rootDir, "packages", dirent.name, "package.json")
19 if (!_fs.existsSync(path)) continue
20
21 const packageJson = JSON.parse(_fs.readFileSync(path, "utf8"))
22 versions.set(packageJson.name, packageJson.version)
23 }
24 return versions
25}
26
27const copyFile = (from, to) => {
28 _fs.mkdirSync(_path.dirname(to), { recursive: true })

Callers 1

applyPublishConfigFunction · 0.85

Calls 3

joinMethod · 0.80
parseMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…