Skip to content

Commit

Permalink
ci(sdk): start publishing @prisma/internals (#13870)
Browse files Browse the repository at this point in the history
* ci(sdk): start publishing `@prisma/internals`

To unblock #13868

Related #10725

* fix: add `--access public`

Tells the registry that the published package should be public

(cherry picked from commit e3d0098)

* fix script

* fix script 2

(cherry picked from commit a0265b6)
  • Loading branch information
Jolg42 committed Jun 17, 2022
1 parent 82938b9 commit 76ea9f2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/ci/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,25 @@ async function publishPackages(
* - The branch is up-to-date.
*/
await run(pkgDir, `pnpm publish --no-git-checks --tag ${tag}`, dryRun)

// For package `@prisma/sdk` publish again as `@prisma/internals`
// We need to have it published to be able to do the renaming planned for Prisma 4
if (pkgName === '@prisma/sdk') {
if (!dryRun) {
// change package name
await writeToPkgJson(pkgDir, (pkg) => {
pkg.name = `@prisma/internals`
})
}
// publish
await run(pkgDir, `pnpm publish --no-git-checks --tag ${tag} --access public`, dryRun)
if (!dryRun) {
// revert
await writeToPkgJson(pkgDir, (pkg) => {
pkg.name = `@prisma/sdk`
})
}
}
}
}
}
Expand Down

0 comments on commit 76ea9f2

Please sign in to comment.