Skip to content

Commit

Permalink
ci: refactor to work with both node v20+22
Browse files Browse the repository at this point in the history
  • Loading branch information
vobu committed Oct 24, 2024
1 parent 20f878e commit 9e7260a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .retrofit-pkg-json.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// transmogrifying wdi5's package.json to a cjs version
import { promises as fs } from "fs"
import pkgJson from "./package.json" assert { type: "json" }
import { readFileSync } from "fs"
import { dirname, join } from "node:path"
import { fileURLToPath } from "node:url"

const pkgJsonPath = join(dirname(fileURLToPath(import.meta.url)), "./package.json")
const pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"))

;["type", "exports", "types", "files", "workspaces", "scripts", "lint-staged"].forEach((section) => {
delete pkgJson[section]
})
Expand Down

0 comments on commit 9e7260a

Please sign in to comment.