0.4.0 • Published 20 days ago

validate-package-exports v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
20 days ago

validate-package-exports

Node.js CI

Validate your package.json exports actually exist, have valid syntax, and can be imported or required without issues.

Install

pnpm add validate-package-exports -D
npm i validate-package-exports -D
yarn add validate-package-exports -D

Options

FlagDescriptionDefault value
--check / -sCheck syntax of JS filesfalse
--verify / -vVerify a module can be imported or requiredfalse
--concurrency / -cConcurrencyavailableParallelism()
--bail / -bStop after the first errorprocess.env.CI === 'true'
--no-bailTurn off --bailfalse
--info / -iShow info messages.The default behavior is to only show error.process.env.RUNNER_DEBUG === '1'
--no-infoTurn off --infofalse
--json / -jUse JSON outputfalse

Usage

validate-package-exports [FILE]... [options]

:information_source: If you do not provide a path to a package.json, it will try to find one in the current directory.

Package scripts examples

{
  "scripts": {
    "build": "YOUR-BUILD-SCRIPT",
    "postbuild": "validate-package-exports --check --verify"
  }
}

OR

{
  "scripts": {
    "prepublishOnly": "validate-package-exports --check --verify"
  }
}

Using npx

npx --yes validate-package-exports ./path/to/package.json --check --verify

Local development

fnm use
corepack enable
pnpm install
pnpm build
0.4.0

20 days ago

0.3.0

1 month ago

0.2.1

1 month ago

0.2.0

1 month ago

0.1.0

1 month ago