File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { createReadStream , existsSync , statSync } from 'fs'
1+ import { existsSync , statSync } from 'fs'
22import { join } from 'path'
33
44import { Octokit } from '@octokit/rest'
@@ -9,6 +9,7 @@ import { getNapiConfig } from './consts'
99import { debugFactory } from './debug'
1010import { spawn } from './spawn'
1111import { updatePackageJson } from './update-package'
12+ import { readFileAsync } from './utils'
1213import { VersionCommand } from './version'
1314
1415const debug = debugFactory ( 'prepublish' )
@@ -114,7 +115,7 @@ export class PrePublishCommand extends Command {
114115 'content-type' : 'application/octet-stream' ,
115116 } ,
116117 // @ts -expect-error
117- data : createReadStream ( dstPath ) ,
118+ data : await readFileAsync ( dstPath ) ,
118119 } )
119120 console . info ( `${ chalk . green ( dstPath ) } upload success` )
120121 console . info (
You can’t perform that action at this time.
0 commit comments