diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d827bc11..18d225f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,6 @@ jobs: cache: npm - run: npm ci - run: npm run build - - name: "Fix pkg.files file pattern" - run: node scripts/fix-package-json.js - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/fix-package-json.js b/scripts/fix-package-json.js deleted file mode 100644 index 76ab50ef..00000000 --- a/scripts/fix-package-json.js +++ /dev/null @@ -1,15 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const { EOL } = require("os"); - -const pkgPath = path.join(__dirname, "../pkg/package.json"); -const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")); - -pkg.files = pkg.files.map((file) => { - if (file.endsWith("/")) { - return file + "**"; - } - return file; -}); - -fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + EOL, "utf8"); diff --git a/scripts/update-endpoints/code.js b/scripts/update-endpoints/code.js index d02a00ea..08250a61 100644 --- a/scripts/update-endpoints/code.js +++ b/scripts/update-endpoints/code.js @@ -18,9 +18,12 @@ for (const endpoint of ENDPOINTS) { } const uniquePaths = [...new Set(paths.sort())]; -writeFileSync( - "./src/generated/triggers-notification-paths.ts", - prettier.format(`export default ` + JSON.stringify(uniquePaths), { - parser: "typescript", - }), -); +async function main() { + writeFileSync( + "./src/generated/triggers-notification-paths.ts", + await prettier.format(`export default ` + JSON.stringify(uniquePaths), { + parser: "typescript", + }), + ); +} +main();