Italian Translation Report: Node.js [Part 11 - 1121 words]

Jul 21st, 2018
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Opinions on this vary, even among the members of the Technical Steering Committee.
  2. One general rule of thumb is that if Node.js itself needs it (due to historic or functional reasons), then it belongs in Node.js. For instance, parsing is in Node.js because of HTTP protocol support.
  3. Also, functionality that either cannot be implemented outside of core in any reasonable way, or only with significant pain.
  4. It is not uncommon for contributors to suggest new features they feel would make Node.js better. These may or may not make sense to add, but as with all changes, be courteous in how you communicate your stance on these. Comments that make the contributor feel like they should have "known better" or ridiculed for even trying run counter to the.
  6. Node.js has always optimized for speed of execution. If a particular change can be shown to make some part of Node.js faster, it's quite likely to be accepted. Claims that a particular Pull Request will make things faster will almost always be met by requests for performance benchmark results that demonstrate the improvement.
  7. That said, performance is not the only factor to consider. Node.js also optimizes in favor of not breaking existing code in the ecosystem, and not changing working functional code just for the sake of changing.
  8. If a particular Pull Request introduces a performance or functional regression, rather than simply rejecting the Pull Request, take the time to work with the contributor on improving the change. Offer feedback and advice on what would make the Pull Request acceptable, and do not assume that the contributor should already know how to do that. Be explicit in your feedback.
  10. All Pull Requests that contain changes to code must be run through continuous integration (CI) testing at
  11. Only Node.js core Collaborators with commit rights to the repository may start a CI testing run. The specific details of how to do this are included in the new Collaborator.
  12. Ideally, the code change will pass ("be green") on all platform configurations supported by Node.js (there are over 30 platform configurations currently). This means that all tests pass and there are no linting errors. In reality, however, it is not uncommon for the CI infrastructure itself to fail on specific platforms or for so-called "flaky" tests to fail ("be red"). It is vital to visually inspect the results of all failed ("red") tests to determine whether the failure was caused by the changes in the Pull Request.
  14. In most cases, do not squash commits that you add to your Pull Request during the review process. When the commits in your Pull Request land, they may be squashed into one commit per logical change. Metadata will be added to the commit message (including links to the Pull Request, links to relevant issues, and the names of the reviewers). The commit history of your Pull Request, however, will stay intact on the Pull Request page.
  15. For the size of "one logical change", can be a good example. It touches the implementation, the documentation, and the tests, but is still one logical change. All tests should always pass when each individual commit lands on the master branch.
  17. A Pull Request is approved either by saying LGTM, which stands for "Looks Good To Me", or by using GitHub's Approve button. GitHub's Pull Request review feature can be used during the process. For more information, check out the video tutorial or the official documentation.
  18. After you push new changes to your branch, you need to get approval for these new changes again, even if GitHub shows "Approved" because the reviewers have hit the buttons before.
  20. Every Pull Request needs to be tested to make sure that it works on the platforms that Node.js supports. This is done by running the code through the CI system.
  21. Only a Collaborator can start a CI run. Usually one of them will do it for you as approvals for the Pull Request come in. If not, you can ask a Collaborator to start a CI run.
  23. A Pull Request needs to stay open for at least 48 hours (72 hours on a weekend) from when it is submitted, even after it gets approved and passes the CI. This is to make sure that everyone has a chance to weigh in. If the changes are trivial, collaborators may decide it doesn't need to wait. A Pull Request may well take longer to be merged in. All these precautions are important because Node.js is widely used, so don't be discouraged!
  25. If you want to know more about the code review and the landing process, see the.
  28. A function to call when a set access of the property is performed.
  29. If this is passed in, set and to (since these members won't be used).
  30. The given function is called implicitly by the runtime when the
  31. property is set from JavaScript code (or if a set on the property is
  32. performed using a N-API call).
  33. Set this to make the property descriptor object's property to be a JavaScript function represented by.
  34. The attributes associated with the particular property. See
  35. The callback data passed into and if this function is invoked.
  37. Functions
  38. The object from which to retrieve the properties.
  39. A representing an array of JavaScript values that represent the property names of the object.
  40. The API can be used to iterate over using and
  41. This API returns the names of the enumerable properties of as an array
  42. of strings.
  43. The properties of whose key is a symbol will not be
  44. included.
  45. The object on which to set the property.
  46. The name of the property to set.
  47. The property value.
  48. This API set a property on the passed in.
  49. The object from which to retrieve the property.
  50. This API gets the requested property from the passed in.
  51. The object to query.
  52. The name of the property whose existence to check.
  53. Whether the property exists on the object or not.
  54. This API checks if the passed in has the named property.
  56. Working with JavaScript Functions
  57. N-API provides a set of APIs that allow JavaScript code to call back into native code.
  58. N-API APIs that support calling back into native code take in a callback functions represented by the type.
  59. When the JavaScript VM calls back to native code, the function provided is invoked. The APIs documented in this section allow the callback function to do the following:
  60. Get information about the context in which the callback was invoked.
  61. Get the arguments passed into the callback.
  62. Return a back from the callback.
  63. Additionally, N-API provides a set of functions which allow calling JavaScript functions from native code. One can either call a function like a regular JavaScript function call, or as a constructor function.
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.