Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pnpm pack JSON output option #8764

@karlhorky

Description

@karlhorky

Contribution

Describe the user story

Allow easy parsing of pnpm pack output, to avoid code like this:

Describe the solution you'd like

Maybe pnpm pack --format json? (like pnpm outdated --format json #5582 )

$ pnpm pack --format json
{
  "tarball": "upleveled-preflight-8.0.4.tgz",
  "contents": [
    "bin/preflight.sh",
    "LICENSE",
    "package.json",
    "README.md",
    "src/checks/allChangesCommittedToGit.ts",
    "src/checks/eslint.ts",
    "src/checks/eslintConfigIsValid.ts",
    "src/checks/linkOnGithubAbout.ts",
    "src/checks/nodeModulesIgnoredFromGit.ts",
    "src/checks/noDependencyProblems/noDependenciesWithoutTypes.ts",
    "src/checks/noDependencyProblems/noUnusedDependencies.ts",
    "src/checks/noExtraneousFilesCommittedToGit.ts",
    "src/checks/noSecretsCommittedToGit.ts",
    "src/checks/preflightIsLatestVersion.ts",
    "src/checks/prettier.ts",
    "src/checks/projectFolderNameMatchesCorrectFormat.ts",
    "src/checks/stylelint.ts",
    "src/checks/stylelintConfigIsValid.ts",
    "src/checks/useSinglePackageManager.ts",
    "src/index.ts",
    "src/util/commandExample.ts",
    "src/util/crossPlatform.ts",
    "src/util/drone.ts",
    "src/util/packageJson.ts",
    "src/util/preflightBinPath.ts",
    "src/util/randomUserAgent.ts"
  ]
}

Describe the drawbacks of your solution

More code to maintain

Describe alternatives you've considered

My verbose parsing solution

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions