Skip to content

Latest commit

 

History

History
112 lines (77 loc) · 2.94 KB

CONTRIBUTING.md

File metadata and controls

112 lines (77 loc) · 2.94 KB

CONTRIBUTING

We strive for stability and security.

Pull Requests and contributions in general are welcome as long as they don't compromise those goals and follow the Node aesthetic.

Project structure and management

This repository is a monorepo for multiple packages.

At the moment this repository is managed through Lerna with the following strategy below. This strategy is not perfect, as Lerna is not (at least at time of writing) a tool perfectly fit for all npm current uses and best practices cf. lerna/lerna#1663, lerna/lerna#1462. And Lerna is missing best practices for different use cases (at least at time of writing). So this strategy is subject to change as we get more knowledge of Lerna and as new releases will be done. Don't hesitate to propose better strategies, PR are welcomed!

Strategy

  • "Fixed/Locked" mode (Lerna default mode) for now
  • All devDependencies in the root-level package.json. This is the sanest thing to do since all the packages are very very similar.
  • Only one package-lock.json file at the root

Running tests

cd node-convict
npm run setup
npm test

Code style

Coding style is described through the EditorConfig .editorconfig file and enforced by ESLint through the .eslintrc file.

Running the following command line will help you to conform your newly written code:

cd node-convict
npm run setup
npm run lint:fix

Updating dependencies and devDependencies

  1. Modify the versions of the dependencies by editing the packages/*/package.json files

  2. Modify the versions the devDependencies in the root-level package.json file

  3. Fetch the packages and update the package-lock.json

cd node-convict
npm install
npm install packages/*
npx lerna link

Never run lerna bootstrap, cf. lerna/lerna#1462 (comment)

Creating/Tagging and publishing new versions

This section is especially intended for the maintainers of the project.

Before any new release the CHANGELOG must be updated.

Everything tagging and publishing should be done throug Lerna.

Tagging a new version

Tagging should not be done manually, nor through the npm version command. Tagging should be done through lerna.

cd node-convict
npm run setup
npx lerna version 6.0.0

Publishing a new version

Publishing should not be done through the npm publish command. Publishing should be done through lerna.

This action can only be performed by a Mozilla employee with enough accesses.

cd node-convict
npm run setup
npx lerna publish from-git