Skip to content

Commit

Permalink
ci: fix additional fromPackageRoot references in scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalbdivad committed Jul 15, 2023
1 parent 203c1a2 commit 3be44d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dev/scripts/testTsVersions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { rmSync, writeFileSync } from "node:fs"
import { fromHere, fromPackageRoot, readJson } from "../attest/src/fs.js"
import { fromHere, readJson } from "../attest/src/fs.js"
import { shell } from "../attest/src/shell.js"

const versions: { [k: string]: string } = {
Expand All @@ -11,7 +11,7 @@ const originalTsMorphVersion = rootJson["devDependencies"]["ts-morph"]

// Allow us to install a different version of ts-morph for testing
// without affecting our package.json
const npmrcPath = fromPackageRoot(".npmrc")
const npmrcPath = fromHere("..", "..", ".npmrc")
rmSync(npmrcPath, { force: true })
writeFileSync(npmrcPath, "save=false")

Expand Down
8 changes: 4 additions & 4 deletions dev/scripts/updateVersions.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/** Changesets doesn't understand version suffixes like -alpha by default, so we use this to preserve them */
import { readFileSync, writeFileSync } from "node:fs"
import { join } from "node:path"

import {
fromHere,
fromPackageRoot,
readJson,
readPackageJson,
writeJson
Expand All @@ -25,7 +23,9 @@ packageJson.version = packageJson.version.slice(0, -currentSuffix.length - 1)
writeJson(packageJsonPath, packageJson)

shell(
`node ${fromPackageRoot(
`node ${fromHere(
"..",
"..",
"node_modules",
"@changesets",
"cli",
Expand All @@ -42,7 +42,7 @@ const suffixedVersion = nonSuffixedVersion + `-${currentSuffix}`
packageJson.version = suffixedVersion
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 4))

const changelogPath = fromPackageRoot("CHANGELOG.md")
const changelogPath = fromHere("..", "..", "CHANGELOG.md")

writeFileSync(
changelogPath,
Expand Down

0 comments on commit 3be44d8

Please sign in to comment.