Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Lint packaging errors. Ensure compatibility across environments.
This package contains a CLI and API to lint packages locally. The package to be linted must exist and be built locally for the lint to succeed. To test other npm packages, try https://publint.dev.
# Lint your library project
$ npx publint
# Lint a dependency
$ npx publint ./node_modules/some-lib
# Lint your project's dependencies based on package.json
$ npx publint deps
Use npx publint --help
for more information.
import { publint } from 'publint'
const { messages } = await publint({
/**
* Path to your package that contains a package.json file.
* Defaults to `process.cwd()` in node, `/` in browser.
*/
pkgDir: './path/to/package',
/**
* A virtual file-system object that handles fs/path operations.
* This field is required if you're using in the browser.
*/
vfs: createCustomVfsObj(),
/**
* The level of messages to log (default: `'suggestion'`).
* - `suggestion`: logs all messages
* - `warning`: logs only `warning` and `error` messages
* - `error`: logs only `error` messages
*/
level: 'warning',
/**
* Report warnings as errors.
*/
strict: true
})
console.log(messages)
Extra utilities are exported under publint/utils
:
import { formatMessage } from 'publint/utils'
import fs from 'node:fs/promises'
const pkg = JSON.parse(
await fs.readFile('./path/to/package/package.json', 'utf8')
)
for (const message of messages) {
// Prints default message in Node.js. Always a no-op in browsers.
// Useful for re-implementing the CLI in a programmatic way.
console.log(formatMessage(message, pkg))
}
MIT
FAQs
Lint packaging errors
The npm package publint receives a total of 56,213 weekly downloads. As such, publint popularity was classified as popular.
We found that publint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.