Skip to content

Commit fb24d25

Browse files
Merge node 12.19.0
Merges the changes from the node v12.19.0 release into nodejs-mobile.
2 parents c8ed416 + d68bff2 commit fb24d25

File tree

2,905 files changed

+211060
-94641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,905 files changed

+211060
-94641
lines changed

.eslintrc.js

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = {
5959
],
6060
rules: {
6161
// ESLint built-in rules
62-
// http://eslint.org/docs/rules
62+
// https://eslint.org/docs/rules/
6363
'accessor-pairs': 'error',
6464
'array-callback-return': 'error',
6565
'arrow-parens': ['error', 'always'],
@@ -129,6 +129,7 @@ module.exports = {
129129
'no-dupe-else-if': 'error',
130130
'no-duplicate-case': 'error',
131131
'no-duplicate-imports': 'error',
132+
'no-else-return': ['error', { allowElseIf: true }],
132133
'no-empty-character-class': 'error',
133134
'no-ex-assign': 'error',
134135
'no-extra-boolean-cast': 'error',
@@ -189,34 +190,6 @@ module.exports = {
189190
// as well to lib/.eslintrc.yaml.
190191
'no-restricted-syntax': [
191192
'error',
192-
{
193-
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.2.type='Literal']",
194-
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()',
195-
},
196-
{
197-
selector: "CallExpression[callee.property.name='doesNotThrow']",
198-
message: 'Do not use `assert.doesNotThrow()`. Write the code without the wrapper and add a comment instead.',
199-
},
200-
{
201-
selector: "CallExpression[callee.property.name='doesNotReject']",
202-
message: 'Do not use `assert.doesNotReject()`. Write the code without the wrapper and add a comment instead.',
203-
},
204-
{
205-
selector: "CallExpression[callee.property.name='rejects'][arguments.length<2]",
206-
message: '`assert.rejects()` must be invoked with at least two arguments.',
207-
},
208-
{
209-
selector: "CallExpression[callee.property.name='strictEqual'][arguments.2.type='Literal']",
210-
message: 'Do not use a literal for the third argument of assert.strictEqual()',
211-
},
212-
{
213-
selector: "CallExpression[callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
214-
message: 'Use an object as second argument of `assert.throws()`.',
215-
},
216-
{
217-
selector: "CallExpression[callee.property.name='throws'][arguments.length<2]",
218-
message: '`assert.throws()` must be invoked with at least two arguments.',
219-
},
220193
{
221194
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
222195
message: '`setTimeout()` must be invoked with at least two arguments.',
@@ -229,22 +202,6 @@ module.exports = {
229202
selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]',
230203
message: 'Use `new` keyword when throwing an `Error`.',
231204
},
232-
{
233-
selector: "CallExpression[callee.property.name='notDeepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
234-
message: 'The first argument should be the `actual`, not the `expected` value.',
235-
},
236-
{
237-
selector: "CallExpression[callee.property.name='notStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
238-
message: 'The first argument should be the `actual`, not the `expected` value.',
239-
},
240-
{
241-
selector: "CallExpression[callee.property.name='deepStrictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
242-
message: 'The first argument should be the `actual`, not the `expected` value.',
243-
},
244-
{
245-
selector: "CallExpression[callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])",
246-
message: 'The first argument should be the `actual`, not the `expected` value.',
247-
},
248205
{
249206
selector: "CallExpression[callee.name='isNaN']",
250207
message: 'Use Number.isNaN() instead of the global isNaN() function.',

.github/CODEOWNERS

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Node.js Project Codeowners
2+
3+
# 1. Codeowners must always be teams, never individuals
4+
# 2. Each codeowner team should contain at least one TSC member
5+
# 3. PRs touching any code with a codeowner must be signed off by at least one
6+
# person on the code owner team.
7+
8+
# tsc & commcomm
9+
10+
/.github/CODEOWNERS @nodejs/tsc
11+
/GOVERNANCE.md @nodejs/tsc
12+
/onboarding.md @nodejs/tsc
13+
/CODE_OF_CONDUCT.md @nodejs/tsc @nodejs/community-committee
14+
/CONTRIBUTING.md @nodejs/tsc @nodejs/community-committee
15+
/LICENSE @nodejs/tsc @nodejs/community-committee
16+
/doc/guides/contributing/code-of-conduct.md @nodejs/tsc @nodejs/community-committee
17+
# TODO(mmarchini): the bot doens't have a notion of precedence, that might
18+
# change when move the codeowners code to an Action, at which point we can
19+
# uncomment the line below
20+
# /doc/guides/contributing/*.md @nodejs/tsc
21+
/doc/guides/contributing/issues.md @nodejs/tsc
22+
/doc/guides/contributing/pull-requests.md @nodejs/tsc
23+
/doc/guides/collaborator-guide.md @nodejs/tsc
24+
/doc/guides/offboarding.md @nodejs/tsc
25+
/doc/guides/onboarding-extras.md @nodejs/tsc
26+
27+
# net
28+
29+
/deps/cares @nodejs/net
30+
/doc/api/dns.md @nodejs/net
31+
/doc/api/dgram.md @nodejs/net
32+
/doc/api/net.md @nodejs/net
33+
/lib/dgram.js @nodejs/net
34+
/lib/dns.js @nodejs/net
35+
/lib/net.js @nodejs/net @nodejs/quic
36+
/lib/internal/dgram.js @nodejs/net
37+
/lib/internal/dns/* @nodejs/net
38+
/lib/internal/net.js @nodejs/net
39+
/lib/internal/socket_list.js @nodejs/net
40+
/lib/internal/js_stream_socket.js @nodejs/net
41+
/src/cares_wrap.h @nodejs/net
42+
/src/connect_wrap.* @nodejs/net
43+
/src/connection_wrap.* @nodejs/net
44+
/src/node_sockaddr* @nodejs/net
45+
/src/tcp_wrap.* @nodejs/net
46+
/src/udp_wrap.* @nodejs/net
47+
48+
# tls/crypto
49+
50+
/lib/internal/crypto/* @nodejs/crypto
51+
/lib/internal/tls.js @nodejs/crypto @nodejs/net
52+
/lib/crypto.js @nodejs/crypto
53+
/lib/tls.js @nodejs/crypto @nodejs/net
54+
/src/node_crypto* @nodejs/crypto
55+
/src/node_crypto_common* @nodejs/crypto @nodejs/quic
56+
57+
# http
58+
59+
/deps/llhttp/* @nodejs/http @nodejs/net
60+
/doc/api/http.md @nodejs/http @nodejs/net
61+
/doc/api/http2.md @nodejs/http @nodejs/net
62+
/lib/_http_* @nodejs/http @nodejs/net
63+
/lib/http.js @nodejs/http @nodejs/net
64+
/lib/https.js @nodejs/crypto @nodejs/net @nodejs/http
65+
/src/node_http_common* @nodejs/http @nodejs/http2 @nodejs/quic @nodejs/net
66+
/src/node_http_parser.cc @nodejs/http @nodejs/net
67+
68+
# http2
69+
70+
/deps/nghttp2/* @nodejs/http2 @nodejs/net
71+
/doc/api/http2.md @nodejs/http2 @nodejs/net
72+
/lib/http2.js @nodejs/http2 @nodejs/net
73+
/lib/internal/http2/* @nodejs/http2 @nodejs/net
74+
/src/node_http2* @nodejs/http2 @nodejs/net
75+
/src/node_mem* @nodejs/http2
76+
77+
# modules
78+
79+
/doc/api/modules.md @nodejs/modules
80+
/doc/api/esm.md @nodejs/modules
81+
/doc/api/module.md @nodejs/modules
82+
/doc/api/packages.md @nodejs/modules
83+
/lib/module.js @nodejs/modules
84+
/lib/internal/modules/* @nodejs/modules
85+
/lib/internal/bootstrap/loaders.js @nodejs/modules
86+
/src/module_wrap* @nodejs/modules @nodejs/vm
87+
88+
# N-API
89+
90+
/src/node_api* @nodejs/n-api
91+
/src/js_native_api* @nodejs/n-api
92+
/doc/guides/adding-new-napi-api.md @nodejs/n-api
93+
/doc/api/n-api.md @nodejs/n-api
94+
95+
# WASI
96+
/deps/uvwasi/ @nodejs/wasi
97+
/doc/api/wasi.md @nodejs/wasi
98+
/lib/wasi.js @nodejs/wasi
99+
/src/node_wasi* @nodejs/wasi
100+
/test/wasi/ @nodejs/wasi
101+
/test/fixtures/wasi/ @nodejs/wasi
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
name: "\U0001F4D7 Open an issue regarding the Node.js API reference docs"
3+
about: Let us know about any problematic API reference documents
4+
title: "doc: "
5+
labels: doc
6+
---
7+
8+
# 📗 API Reference Docs Problem
9+
10+
<!--
11+
12+
Thank you for wanting to make nodejs.org better!
13+
14+
This template is for issues with the Node.js API
15+
reference documentation.
16+
17+
For problems with nodejs.org beyond the API
18+
reference documentation, please open an issue
19+
using the issue tracker for our site repository.
20+
21+
https://github.com/nodejs/nodejs.org
22+
23+
For more general support, please open an issue
24+
using the issue tracker for our help repository.
25+
26+
https://github.com/nodejs/help
27+
28+
---
29+
30+
For the issue title, please enter a one-line
31+
summary after “doc: ” (preferably 50 characters
32+
or less and no more than 72).
33+
34+
The “✍️” are placeholders signifying requests for
35+
input. Replace them with your responses.
36+
37+
If you are unsure of something, do your best.
38+
39+
-->
40+
41+
<!-- The output of “node --version”. -->
42+
43+
- **Version**: ✍️
44+
45+
<!-- The output of “uname -a” (UNIX) or version
46+
and 32-bit or 64-bit (Windows). -->
47+
48+
- **Platform**: ✍️
49+
50+
<!-- The name of affected core module. -->
51+
52+
- **Subsystem**: ✍️
53+
54+
## Location
55+
56+
_Section of the site where the content exists_
57+
58+
Affected URL(s):
59+
60+
- https://nodejs.org/api/✍️
61+
62+
## Description
63+
64+
_Concise explanation of the problem_
65+
66+
<!-- If applicable, include any screenshots that
67+
may help solve the problem. -->
68+
69+
✍️
70+
71+
---
72+
73+
<!-- Use “[x]” to check the box below if you are
74+
interested in contributing. -->
75+
76+
- [ ] I would like to work on this issue and
77+
submit a pull request.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Report a flaky test
3+
about: Report a flaky test in our CI
4+
labels: "CI / flaky test"
5+
6+
---
7+
8+
<!--
9+
Thank you for reporting a flaky test.
10+
11+
Flaky tests are tests that fail occasionally in the Node.js CI, but not
12+
consistently enough to block PRs from landing, or that are failing in CI jobs or
13+
test modes that are not run for every PR.
14+
15+
Please fill in as much of the template below as you're able.
16+
17+
Test: The test that is flaky - e.g. `test-fs-stat-bigint`
18+
Platform: The platform the test is flaky on - e.g. `macos` or `linux`
19+
Console Output: A pasted console output from a failed CI job showing the whole
20+
failure of the test
21+
Build Links: Links to builds affected by the flaky test
22+
23+
If any investigation has been done, please include any information found, such
24+
as how consistently the test fails, whether the failure could be reproduced
25+
locally, when the test started failing, or anything else you think is relevant.
26+
-->
27+
28+
* **Test**:
29+
* **Platform**:
30+
* **Console Output:**
31+
```
32+
REPLACE ME
33+
```
34+
* **Build Links**:

.github/workflows/auto-start-ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: Auto Start CI
3+
4+
on:
5+
schedule:
6+
# Runs every five minutes (fastest the scheduler can run). Five minutes is
7+
# optimistic, it can take longer to run.
8+
# To understand why `schedule` is used instead of other events, refer to
9+
# ./doc/guides/commit-queue.md
10+
- cron: "*/5 * * * *"
11+
12+
jobs:
13+
startCI:
14+
if: github.repository == 'nodejs/node'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@master
18+
19+
# Install dependencies
20+
- name: Install jq
21+
run: sudo apt-get install jq -y
22+
- name: Install Node.js
23+
uses: actions/setup-node@v2-beta
24+
with:
25+
node-version: '12'
26+
- name: Install node-core-utils
27+
run: npm install -g node-core-utils
28+
29+
- name: Set variables
30+
run: |
31+
echo "::set-env name=REPOSITORY::$(echo ${{ github.repository }} | cut -d/ -f2)"
32+
echo "::set-env name=OWNER::${{ github.repository_owner }}"
33+
34+
# Get Pull Requests
35+
- name: Get Pull Requests
36+
uses: octokit/graphql-action@v2.x
37+
id: get_prs_for_ci
38+
with:
39+
query: |
40+
query prs($owner:String!, $repo:String!) {
41+
repository(owner:$owner, name:$repo) {
42+
pullRequests(labels: ["request-ci"], states: OPEN, last: 100) {
43+
nodes {
44+
number
45+
}
46+
}
47+
}
48+
}
49+
owner: ${{ env.OWNER }}
50+
repo: ${{ env.REPOSITORY }}
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Setup node-core-utils
55+
run: |
56+
ncu-config set username ${{ secrets.JENKINS_USER }}
57+
ncu-config set token none
58+
ncu-config set jenkins_token ${{ secrets.JENKINS_TOKEN }}
59+
ncu-config set owner ${{ env.OWNER }}
60+
ncu-config set repo ${{ env.REPOSITORY }}
61+
62+
- name: Start CI
63+
run: ./tools/actions/start-ci.sh ${{ secrets.GITHUB_TOKEN }} ${{ env.OWNER }} ${{ env.REPOSITORY }} $(echo '${{ steps.get_prs_for_ci.outputs.data }}' | jq '.repository.pullRequests.nodes | map(.number) | .[]')

.github/workflows/close-stalled.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Close stalled issues and PRs
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v3
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
days-before-close: 30
14+
stale-pr-label: stalled
15+
stale-issue-label: stalled
16+
close-issue-message: Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
17+
close-pr-message: Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
18+
# used to filter issues to check whether or not should be closed, avoids hitting maximum operations allowed if needing to paginate through all open issues
19+
only-labels: stalled
20+
# max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
21+
operations-per-run: 500
22+
# deactivates automatic removal of stalled label if issue gets any activity
23+
remove-stale-when-updated: false
24+
# deactivates automatic stale labelling as we prefer to do that manually
25+
days-before-stale: -1

0 commit comments

Comments
 (0)