1- import { exec } from "@actions/exec" ;
1+ import { exec , getExecOutput } from "@actions/exec" ;
22import * as github from "@actions/github" ;
33import fs from "fs-extra" ;
44import { getPackages , Package } from "@manypkg/get-packages" ;
@@ -7,7 +7,6 @@ import * as semver from "semver";
77import { PreState } from "@changesets/types" ;
88import {
99 getChangelogEntry ,
10- execWithOutput ,
1110 getChangedPackages ,
1211 sortTheThings ,
1312 getVersionsByDirectory ,
@@ -40,14 +39,14 @@ const createRelease = async (
4039 ) ;
4140 }
4241
43- await octokit . repos . createRelease ( {
42+ await octokit . rest . repos . createRelease ( {
4443 name : tagName ,
4544 tag_name : tagName ,
4645 body : changelogEntry . content ,
4746 prerelease : pkg . packageJson . version . includes ( "-" ) ,
4847 ...github . context . repo ,
4948 } ) ;
50- } catch ( err : any ) {
49+ } catch ( err ) {
5150 // if we can't find a changelog, the user has probably disabled changelogs
5251 if ( err . code !== "ENOENT" ) {
5352 throw err ;
@@ -82,7 +81,7 @@ export async function runPublish({
8281 let octokit = github . getOctokit ( githubToken ) ;
8382 let [ publishCommand , ...publishArgs ] = script . split ( / \s + / ) ;
8483
85- let changesetPublishOutput = await execWithOutput (
84+ let changesetPublishOutput = await getExecOutput (
8685 publishCommand ,
8786 publishArgs ,
8887 { cwd }
@@ -165,7 +164,7 @@ export async function runPublish({
165164const requireChangesetsCliPkgJson = ( cwd : string ) => {
166165 try {
167166 return require ( resolveFrom ( cwd , "@changesets/cli/package.json" ) ) ;
168- } catch ( err : any ) {
167+ } catch ( err ) {
169168 if ( err && err . code === "MODULE_NOT_FOUND" ) {
170169 throw new Error (
171170 `Have you forgotten to install \`@changesets/cli\` in "${ cwd } "?`
@@ -292,7 +291,7 @@ export async function runVersion({
292291 }
293292
294293 let searchQuery = `repo:${ repo } +state:open+head:${ versionBranch } +base:${ branch } +is:pull-request` ;
295- let searchResultPromise = octokit . search . issuesAndPullRequests ( {
294+ let searchResultPromise = octokit . rest . search . issuesAndPullRequests ( {
296295 q : searchQuery ,
297296 } ) ;
298297 let changedPackages = await getChangedPackages ( cwd , versionsByDirectory ) ;
@@ -342,7 +341,7 @@ export async function runVersion({
342341
343342 if ( searchResult . data . items . length === 0 ) {
344343 console . log ( "creating pull request" ) ;
345- const { data : newPullRequest } = await octokit . pulls . create ( {
344+ const { data : newPullRequest } = await octokit . rest . pulls . create ( {
346345 base : branch ,
347346 head : versionBranch ,
348347 title : finalPrTitle ,
@@ -357,7 +356,7 @@ export async function runVersion({
357356 const [ pullRequest ] = searchResult . data . items ;
358357
359358 console . log ( `updating found pull request #${ pullRequest . number } ` ) ;
360- await octokit . pulls . update ( {
359+ await octokit . rest . pulls . update ( {
361360 pull_number : pullRequest . number ,
362361 title : finalPrTitle ,
363362 body : prBody ,
0 commit comments