Italian Translation Report: Node.js [Part 9 - 1789 words]

Jul 20th, 2018
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Pull Requests
  2. There are two fundamental components of the Pull Request process: one concrete
  3. and technical, and one more process oriented.
  4. The concrete and technical
  5. component involves the specific details of setting up your local environment
  6. so that you can make the actual changes.
  7. This is where we will start.
  8. Dependencies
  9. Setting up your local environment
  10. Step 1: Fork
  11. Step 2: Branch
  12. The Process of Making Changes
  13. Step 3: Code
  14. Step 4: Commit
  15. Commit message guidelines
  16. Step 5: Rebase
  17. Step 6: Test
  18. Test Coverage
  19. Step 7: Push
  20. Step 8: Opening the Pull Request
  21. Step 9: Discuss and Update
  22. Approval and Request Changes Workflow
  23. Step 10: Landing
  24. Reviewing Pull Requests
  25. Review a bit at a time
  26. Be aware of the person behind the code
  27. Respect the minimum wait time for comments
  28. Abandoned or Stalled Pull Requests
  29. Approving a change
  30. Accept that there are different opinions about what belongs in Node.js
  31. Performance is not everything
  32. Continuous Integration Testing
  33. Additional Notes
  34. Commit Squashing
  35. Getting Approvals for your Pull Request
  36. CI Testing
  37. Waiting Until the Pull Request Gets Landed
  38. Check Out the Collaborator Guide
  40. Node.js has several bundled dependencies in the deps/ and the tools/ directories that are not part of the project proper. Changes to files in those directories should be sent to their respective projects. Do not send a patch to Node.js. We cannot accept such patches.
  41. In case of doubt, open an issue in the issue tracker or contact one of the project Collaborators. Node.js has two IRC channels: #Node.js for general help and questions, and #Node-dev for development of Node.js core specifically.
  43. To get started, you will need to have installed locally. Depending on your operating system, there are also a number of other dependencies required. These are detailed in the
  44. Once you have and are sure you have all of the necessary dependencies, it's time to create a fork.
  46. Fork the project on GitHub and clone your fork locally.
  47. It is recommended to configure git so that it knows who you are:
  48. Please make sure this local email is also added to your GitHub email list so that your commits will be properly associated with your account and you will be promoted to Contributor once your first commit is landed.
  50. As a best practice to keep your development environment as organized as possible, create local branches to work within. These should also be created directly off of the master branch.
  52. The vast majority of Pull Requests opened against the repository includes changes to one or more of the following:
  53. - the C/C++ code contained in the `src` directory
  54. - the JavaScript code contained in the `lib` directory
  55. - the documentation in `doc/api`
  56. - tests within the `test` directory.
  57. If you are modifying code, please be sure to run from time to time to ensure that the changes follow the Node.js code style guide.
  58. Any documentation you write (including code comments and API documentation) should follow the. Code samples included in the API docs will also be checked when running (or on Windows).
  59. For contributing C++ code, you may want to look at the
  61. It is a recommended best practice to keep your changes as logically grouped as possible within individual commits. There is no limit to the number of commits any single Pull Request may have, and many contributors find it easier to review changes that are split across multiple commits.
  62. Note that multiple commits often get squashed when they are landed (see the notes about).
  63. A good commit message should describe what changed and why.
  64. The first line should:
  65. contain a short description of the change (preferably 50 characters or less, and no more than 72 characters)
  66. be entirely in lowercase with the exception of proper nouns, acronyms, and the words that refer to code, like function/variable names
  67. be prefixed with the name of the changed subsystem and start with an imperative verb. Check the output of to find out what subsystems your changes touch.
  68. Examples:
  69. Keep the second line blank.
  70. Wrap all other lines at 72 columns (except for long URLs).
  71. If your patch fixes an open issue, you can add a reference to it at the end of the log. Use the: prefix and the full issue URL. For other references use:.
  72. If your commit introduces a breaking change, it should contain an explanation about the reason of the breaking change, which situation would trigger the breaking change and what is the exact change.
  73. Sample complete commit message:
  75. subsystem: explain the commit in one line
  76. Body of commit message is a few lines of text, explaining things
  77. in more detail, possibly giving some background about the issue
  78. being fixed, etc.
  79. The body of the commit message can be several paragraphs, and
  80. please do proper word-wrap and keep columns shorter than about
  81. 72 characters or so. That way, `git log` will show things
  82. nicely even when it is indented.
  84. If you are new to contributing to Node.js, please try to do your best at conforming to these guidelines, but do not worry if you get something wrong. One of the existing contributors will help get things situated and the contributor landing the Pull Request will ensure that everything follows the project guidelines.
  85. See - A utility that ensures commits follow the commit formatting guidelines.
  87. As a best practice, once you have committed your changes, it is a good idea
  88. to use (not ) to synchronize your work with the main
  89. repository.
  91. This ensures that your working branch has the latest changes from master.
  93. Bug fixes and features should always come with tests. A guide for writing tests in Node.js has been provided to make the process easier. Looking at other tests to see how they should be structured can also help.
  94. The test directory within the repository is complex and it is often not clear where a new test file should go. When in doubt, add new tests to the directory and the right location will be sorted out later.
  95. Before submitting your changes in a Pull Request, always run the full Node.js test suite. To run the tests (including code linting) on Unix / macOS:
  97. And on Windows:
  99. (See the for more details.)
  100. Make sure the linter does not report any issues and that all tests pass. Please do not submit patches that fail either check.
  101. If you want to run the linter without running tests, use. It will run both JavaScript linting and C++ linting.
  102. If you are updating tests and just want to run a single test to check it:
  103. You can execute the entire suite of tests for a given subsystem by providing the name of a subsystem:
  104. If you want to check the other options, please refer to the help by using the option
  105. You can usually run tests directly with node:
  106. Remember to recompile with in between test runs if you change code in the or directories.
  108. It's good practice to ensure any code you add or change is covered by tests. You can do so by running the test suite with coverage enabled:
  110. A detailed coverage report will be written to for JavaScript coverage and to for C++ coverage.
  111. Note that generating a test coverage report can take several minutes.
  112. To collect coverage for a subset of tests you can set the and variables:
  113. The above command executes tests for the subsystem and outputs the resulting coverage report.
  114. Running tests with coverage will create and modify several directories and files. To clean up afterwards, run:
  116. Once you are sure your commits are ready to go, with passing tests and linting, begin the process of opening a Pull Request by pushing your working branch to your fork on GitHub.
  117. From within GitHub, opening a new Pull Request will present you with a template that should be filled out:
  119. Thank you for your Pull Request. Please provide a description above and review
  120. the requirements below.
  121. Bug fixes and new features should include tests and possibly benchmarks.
  122. Remove items that do not apply. For completed items, change to.
  123. Please try to do your best at filling out the details, but feel free to skip parts if you're not sure what to put.
  124. Once opened, Pull Requests are usually reviewed within a few days.
  126. You will probably get feedback or requests for changes to your Pull Request. This is a big part of the submission process so don't be discouraged! Some contributors may sign off on the Pull Request right away, others may have more detailed comments or feedback. This is a necessary part of the process in order to evaluate whether the changes are correct and necessary.
  127. To make changes to an existing Pull Request, make the changes to your local branch, add a new commit with those changes, and push those to your fork. GitHub will automatically update the Pull Request.
  129. It is also frequently necessary to synchronize your Pull Request with other changes that have landed in by using:
  130. Important: The command is one of the few ways to delete history in. Before you use it, make sure you understand the risks. If in doubt, you can always ask for guidance in the Pull Request or on IRC in the #node-dev channel.
  131. If you happen to make a mistake in any of your commits, do not worry. You can amend the last commit (for example if you want to change the commit log).
  133. There are a number of more advanced mechanisms for managing commits using that can be used, but are beyond the scope of this guide.
  134. Feel free to post a comment in the Pull Request to ping reviewers if you are awaiting an answer on something. If you encounter words or acronyms that seem unfamiliar, refer to this glossary.
  136. All Pull Requests require "sign off" in order to land. Whenever a contributor reviews a Pull Request they may find specific details that they would like to see changed or fixed. These may be as simple as fixing a typo, or may involve substantive changes to the code you have written. While such requests are intended to be helpful, they may come across as abrupt or unhelpful, especially requests to change things that do not include concrete suggestions on how to change them.
  137. Try not to be discouraged. If you feel that a particular review is unfair, say so, or contact one of the other contributors in the project and seek their input. Often such comments are the result of the reviewer having only taken a short amount of time to review and are not ill-intended. Such issues can often be resolved with a bit of patience. That said, reviewers should be expected to be helpful in their feedback, and feedback that is simply vague, dismissive and unhelpful is likely safe to ignore.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.