This contributing guide is meant for internal LinkedIn maintainers. We are not currently accepting contributions from outside of LinkedIn at this time. If you are not a LinkedIn engineer, we appreciate your interest in our library and encourage you to provide bug reports or suggestions by opening an issue in the GitHub repo.
Please follow conventional commits
Make sure the documentation is consistent with any code changes in the same PR.
If there are code changes that might affect the example code (/examples), ensure each example runs correctly, or update accordingly.
Note that example scripts use the built code in /dist, so if you have local changes that aren't being reflected, make sure to run npm install from inside the /examples directory to ensure the client code is up-to-date.
Ensure tests pass by running npm run test. Tests are also run in different node environments when a PR is created.
To release and publish a new version of the library, you must have Write access to the repo and be an owner on the published npm package (npm owner ls linkedin-api-client).
- Obtain a GitHub personal access token
- Put the token in a
.envfile at the root of the project. For example:GITHUB_TOKEN="ghp_7e3..." - From the master branch on a clean working directory, run the following, specifying the semver increment.
npm run release -- <increment> # Example npm run release -- minor
- This will have terminal prompts to confirm various release details. After confirmation, the following will happen:
- The
package.jsonversion will be updated - The
CHANGELOG.mdwill be automatically updated - The modified files will be committed, and the commit will be tagged with the release version
- Commit will be pushed to the remote branch
- A GitHub release will be automatically created based on the tagged commit
- The
- This will have terminal prompts to confirm various release details. After confirmation, the following will happen:
- For now, the actual publishing of the package to NPM is done as a separate step (you may need to
npm loginfirst):npm publish