PackageJson

From forcedotcom/apex-language-support · View interactive version

PackageJson is an AI agent skill from the GitHub repository forcedotcom/apex-language-support. Guidelines for package.json files in packages

How to use this skill

Skill file

Name

any package that's not an npm package should be named @salesforce/foo (whether it actually published to npm or not)

the package that publishes the vscode extension is named apex-language-server-extension

don't rename packages, but do tell the user when stuff doesn't match the rules

types

on an extension, you only need a types prop if your extension will be an extensionDependency of some other extension.

probably not necessary for non-extension packages.

browser

only for web-enabled extensions. Must point to a bundled dist file

npm packages

packages that publish to npm should have a files property in the package.json

scripts

See wireit skill

dependencies

use * as the version for anything that's another package in this repo

devDependencies

packages should not duplicate devDependencies that exist at the top level of the repo.

vscode "contributes"

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.