Skip to content

Commit 51fa7c0

Browse files
Merge pull request #1015 from nodejs/main
Create a new pull request by comparing changes across two branches
2 parents db1fc05 + 9a4eb21 commit 51fa7c0

File tree

210 files changed

+8234
-3671
lines changed

Some content is hidden

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

210 files changed

+8234
-3671
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
/doc/api/permissions.md @nodejs/security-wg
168168
/lib/internal/process/permission.js @nodejs/security-wg
169169
/src/permission/* @nodejs/security-wg
170+
/test/parallel/test-permission-* @nodejs/security-wg
170171

171172
# Dependency Update Tools
172173

benchmark/fs/bench-chownSync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function main({ n, type, method }) {
4545
}
4646
}
4747
bench.end(n);
48-
assert(hasError);
48+
assert.ok(hasError);
4949
break;
5050
}
5151
default:

benchmark/fs/bench-linkSync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function main({ n, type }) {
4141
}
4242
}
4343
bench.end(n);
44-
assert(hasError);
44+
assert.ok(hasError);
4545
break;
4646
}
4747
default:

benchmark/fs/bench-readlinkSync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function main({ n, type }) {
3030
returnValue = fs.readlinkSync(tmpdir.resolve(`.readlink-sync-${i}`), { encoding: 'utf8' });
3131
}
3232
bench.end(n);
33-
assert(returnValue);
33+
assert.ok(returnValue);
3434
break;
3535
}
3636

@@ -45,7 +45,7 @@ function main({ n, type }) {
4545
}
4646
}
4747
bench.end(n);
48-
assert(hasError);
48+
assert.ok(hasError);
4949
break;
5050
}
5151
default:

benchmark/fs/bench-readvSync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function main({ n, type }) {
4949
}
5050

5151
bench.end(n);
52-
assert(hasError);
52+
assert.ok(hasError);
5353
break;
5454
}
5555
default:

benchmark/fs/bench-renameSync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function main({ n, type }) {
2323
}
2424
}
2525
bench.end(n);
26-
assert(hasError);
26+
assert.ok(hasError);
2727
break;
2828
}
2929
case 'valid': {

benchmark/fs/bench-symlinkSync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function main({ n, type }) {
4242
}
4343
}
4444
bench.end(n);
45-
assert(hasError);
45+
assert.ok(hasError);
4646
break;
4747
}
4848
default:

benchmark/fs/bench-writevSync.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function main({ n, type }) {
3030
}
3131

3232
bench.end(n);
33-
assert(result);
33+
assert.ok(result);
3434
fs.closeSync(fd);
3535
break;
3636
case 'invalid': {
@@ -46,7 +46,7 @@ function main({ n, type }) {
4646
}
4747

4848
bench.end(n);
49-
assert(hasError);
49+
assert.ok(hasError);
5050
break;
5151
}
5252
default:

benchmark/fs/read-stream-throughput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function main(conf) {
6767
}
6868

6969
function runTest(filesize, highWaterMark, encoding, n) {
70-
assert(fs.statSync(filename).size === filesize * n);
70+
assert.strictEqual(fs.statSync(filename).size, filesize * n);
7171
const rs = fs.createReadStream(filename, {
7272
highWaterMark,
7373
encoding,

benchmark/misc/startup-cli-version.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ const availableCli = [
1818
].filter((cli) => existsSync(path.resolve(__dirname, '../../', cli)));
1919
const bench = common.createBenchmark(main, {
2020
cli: availableCli,
21-
count: [30],
21+
n: [30],
2222
});
2323

2424
function spawnProcess(cli, bench, state) {
2525
const cmd = process.execPath || process.argv[0];
26-
while (state.finished < state.count) {
26+
while (state.finished < state.n) {
2727
const child = spawnSync(cmd, [cli, '--version'], {
2828
env: { npm_config_loglevel: 'silent', ...process.env },
2929
});
@@ -41,15 +41,15 @@ function spawnProcess(cli, bench, state) {
4141
bench.start();
4242
}
4343

44-
if (state.finished === state.count) {
45-
bench.end(state.count);
44+
if (state.finished === state.n) {
45+
bench.end(state.n);
4646
}
4747
}
4848
}
4949

50-
function main({ count, cli }) {
50+
function main({ n, cli }) {
5151
cli = path.resolve(__dirname, '../../', cli);
5252
const warmup = 3;
53-
const state = { count, finished: -warmup };
53+
const state = { n, finished: -warmup };
5454
spawnProcess(cli, bench, state);
5555
}

0 commit comments

Comments
 (0)