Skip to content

Latest commit

 

History

History
127 lines (83 loc) · 3.21 KB

CONTRIBUTING.md

File metadata and controls

127 lines (83 loc) · 3.21 KB

CONTRIBUTING

Guidelines

We welcome contributions to this project! Please follow the guidelines below to ensure that your contributions are easy to integrate:

  1. Fork the repository to your GitHub account.

  2. Create a new branch for your feature or bug fixes:

    git checkout -b feature-name
  3. Commit your changes:

    git add .
    git commit -m "Description of your changes"
  4. Push your branch to your forked repository:

    git push origin feature-name
  5. Create a pull request from your branch to the main branch of the original repository.

  6. Ensure your pull request follows these guidelines:

    • descriptive title and detailed description
    • reference the issue number (if applicable)
    • provide screenshots or test results, if relevant
    • make sure all tests pass

Run test cases

  1. In ./src/NodeJsSecurify.ts (on lines 36-40),

    1. Change mode to 'DEV' (switch to 'DEV' mode while testing and 'PROD' mode while pushing the code).

    2. Update __dirname path depending on the path of TestFolder/ according to your system.

  2. Now open two terminals in VSCode, or any other code editor or IDE.

  3. In the first terminal run:

    npm run start

    This command watches your main TypeScript file NodeJsSecurify.ts, and automatically recompiles them into a JavaScript file ./dist/NodeJsSecurify.js─on detecting changes.

    The above terminal continuously keeps on running for real-time compilation.

  4. In the second terminal─to run tests in TestFolder/, run :

    node ./dist/src/NodeJsSecurify.js

    Run this after every change you make in the source code.

  5. The following outputs are generated:

    1. output is written to stdout (Standard Output) in the second terminal

    2. a PDF NodeJsSecurifyReport.pdf or log file NodeJsSecurifyReport.log in your root directory

Unit and integration tests

To execute tests in the tests/ directory, the following section in package.json is included:

{
  "scripts": {
    "test": "vitest"
  }
}

Run npm run test, yarn test, or pnpm test─depending on your package manager and the testing framework will print test results in your terminal.

For more information, see the writing tests section.

Coding standards

  • Follow the existing code style.
  • Include comments where necessary to explain complex logic.
  • Write unit tests for new features or fixes.
  • Format your code (if using tools like ESLint, etc.).

Issue tracking

We use GitHub Issues to track bugs, enhancements, and general questions. If you encounter a bug or have an idea for an enhancement, please:

  1. Look for existing issues that are related to yours.
  2. If not, create a new issue and provide sufficient details.

Pull requests

  • Pull requests must be small and focused.
  • Reference any related issues in the pull request description.
  • Each pull request must pass all checks (tests, linting, etc.) before review.

License

This project is licensed under the License: LICENSE.md file for details.