Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit544d4c7

Browse files
committed
fix: do not useexeca.stdout.pipe as it closes the stream
1 parentc8e2ba4 commit544d4c7

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

‎lib/prepare.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ module.exports = async ({tarballDir, pkgRoot}, {cwd, env, stdout, stderr, nextRe
99

1010
if(tarballDir){
1111
logger.log('Creating npm package version %s',version);
12-
constshell=execa('npm',['pack',basePath],{cwd, env});
13-
shell.stdout.pipe(stdout);
14-
shell.stderr.pipe(stderr);
12+
const{stdout:npmStdout,stderr:npmStderr}=awaitexeca('npm',['pack',basePath],{cwd, env});
13+
stdout.write(npmStdout);
14+
stderr.write(npmStderr);
1515

16-
consttarball=(awaitshell).stdout.split('\n').pop();
16+
consttarball=npmStdout.split('\n').pop();
1717
awaitmove(path.resolve(cwd,tarball),path.resolve(cwd,tarballDir.trim(),tarball));
1818
}
1919
};

‎lib/publish.js‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ module.exports = async ({npmPublish, pkgRoot}, pkg, context) => {
1818
constregistry=getRegistry(pkg,context);
1919

2020
logger.log('Publishing version %s to npm registry',version);
21-
constshell=execa('npm',['publish',basePath,'--registry',registry],{cwd, env});
22-
shell.stdout.pipe(stdout);
23-
shell.stderr.pipe(stderr);
24-
awaitshell;
21+
const{stdout:npmStdout,stderr:npmStderr}=awaitexeca('npm',['publish',basePath,'--registry',registry],{
22+
cwd,
23+
env,
24+
});
25+
stdout.write(npmStdout);
26+
stderr.write(npmStderr);
2527

2628
logger.log(`Published${pkg.name}@${pkg.version} on${registry}`);
2729
returngetReleaseInfo(pkg,context,registry);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp