How to use the @yarnpkg/plugin-pack.packUtils.genPackStream function in @yarnpkg/plugin-pack

To help you get started, we’ve selected a few @yarnpkg/plugin-pack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yarnpkg / berry / packages / plugin-npm-cli / sources / commands / npm / publish.ts View on Github external
await packUtils.prepareForPack(workspace, {report}, async () => {
        const files = await packUtils.genPackList(workspace);

        for (const file of files)
          report.reportInfo(null, file);

        const pack = await packUtils.genPackStream(workspace, files);
        const buffer = await miscUtils.bufferStream(pack);

        const body = await makePublishBody(workspace, buffer, {
          access: this.access,
          tag: this.tag,
        });

        try {
          await npmHttpUtils.put(npmHttpUtils.getIdentUrl(ident), body, {
            configuration,
            registry,
            json: true,
          });
        } catch (error) {
          if (error.name !== `HTTPError`) {
            throw error;

@yarnpkg/plugin-pack

BSD-2-Clause
Latest version published 11 months ago

Package Health Score

88 / 100
Full package analysis

Similar packages