mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-12 18:49:41 -04:00
fix(pack): use the correct compression algorithm
This commit is contained in:
5
.changeset/empty-garlics-live.md
Normal file
5
.changeset/empty-garlics-live.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-publishing": patch
|
||||
---
|
||||
|
||||
Use the correct compression algorithm to pack.
|
||||
@@ -1,10 +1,10 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { createGzip } from 'zlib'
|
||||
import { types as allTypes, UniversalOptions, Config } from '@pnpm/config'
|
||||
import { readProjectManifest } from '@pnpm/cli-utils'
|
||||
import exportableManifest from '@pnpm/exportable-manifest'
|
||||
import fg from 'fast-glob'
|
||||
import gunzip from 'gunzip-maybe'
|
||||
import pick from 'ramda/src/pick'
|
||||
import realpathMissing from 'realpath-missing'
|
||||
import renderHelp from 'render-help'
|
||||
@@ -93,7 +93,7 @@ async function packPkg (destFile: string, filesMap: Record<string, string>, proj
|
||||
pack.entry({ name }, fs.readFileSync(source))
|
||||
}
|
||||
const tarball = fs.createWriteStream(destFile)
|
||||
pack.pipe(gunzip()).pipe(tarball)
|
||||
pack.pipe(createGzip()).pipe(tarball)
|
||||
pack.finalize()
|
||||
return new Promise((resolve, reject) => {
|
||||
tarball.on('close', () => resolve()).on('error', reject)
|
||||
|
||||
Reference in New Issue
Block a user