...
 
Commits (553)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
set noparent
filter=-build/include_alpha,-build/include_subdir,-build/include_what_you_use,-legal/copyright,-readability/nolint
linelength=80
[flake8]
exclude=.git,deps,lib,src,tools/gyp,tools/inspector_protocol,tools/pip,tools/v8_gypfiles/broken
ignore=E1,E2,E3,E4,E5,E7,W5,W6
{
"exclude": [
"**/internal/process/write-coverage.js"
],
"compact": false,
"reporter": ["html", "text"]
}
{
"plugins": {
"remark-lint/": {
"blockquote-indentation": 2,
"checkbox-character-style": { "checked": "x", "unchecked": " " },
"checkbox-content-indent": true,
"code-block-style": "fenced",
"definition-case": false,
"definition-spacing": true,
"emphasis-marker": false,
"fenced-code-flag": true,
"fenced-code-marker": "`",
"file-extension": "md",
"final-definition": true,
"final-newline": true,
"first-heading-level": 1,
"hard-break-spaces": true,
"heading-increment": false,
"heading-style": "atx",
"link-title-style": false,
"list-item-bullet-indent": false,
"list-item-content-indent": false,
"list-item-indent": false,
"list-item-spacing": false,
"maximum-heading-length": false,
"maximum-line-length": false,
"no-auto-link-without-protocol": true,
"no-blockquote-without-caret": true,
"no-consecutive-blank-lines": false,
"no-duplicate-definitions": true,
"no-duplicate-headings": false,
"no-emphasis-as-heading": false,
"no-file-name-articles": true,
"no-file-name-consecutive-dashes": true,
"no-file-name-irregular-characters": false,
"no-file-name-mixed-case": false,
"no-file-name-outer-dashes": true,
"no-heading-content-indent": true,
"no-heading-indent": true,
"no-heading-punctuation": false,
"no-html": false,
"no-inline-padding": true,
"no-literal-urls": false,
"no-missing-blank-lines": false,
"no-multiple-toplevel-headings": true,
"no-shell-dollars": true,
"no-shortcut-reference-image": true,
"no-shortcut-reference-link": false,
"no-table-indentation": true,
"no-tabs": true,
"no-undefined-references": false,
"no-unused-definitions": true,
"ordered-list-marker-style": false,
"ordered-list-marker-value": false,
"rule-style": true,
"strong-marker": "*",
"table-cell-padding": "padded",
"table-pipe-alignment": false,
"table-pipes": true,
"unordered-list-marker-style": false
}
}
}
x-ccache-setup-steps: &ccache-setup-steps
- export CCACHE_NOSTATS=1
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
- export CC='ccache gcc-6'
- export CXX='ccache g++-6'
os: linux
language: cpp
env:
global:
- PYTHON_VERSION="2.7.15"
jobs:
include:
- stage: "Compile"
name: "Compile V8"
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
install: *ccache-setup-steps
script:
- pyenv global ${PYTHON_VERSION}
- ./configure
- make -j2 -C out V=1 v8
- name: "Compile Node.js"
cache: ccache
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
install: *ccache-setup-steps
script:
- pyenv global ${PYTHON_VERSION}
- ./configure
- make -j2 V=1
- cp out/Release/node /home/travis/.ccache
- cp out/Release/cctest /home/travis/.ccache
- stage: "Tests"
name: "Test JS Suites"
cache: ccache
install:
- mkdir -p out/Release
- cp /home/travis/.ccache/node out/Release/node
script:
- pyenv global ${PYTHON_VERSION}
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
- name: "Test C++ Suites"
cache: ccache
install:
- export CCACHE_NOSTATS=1
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
- export CC='ccache gcc'
- export CXX='ccache g++'
- mkdir -p out/Release
- cp /home/travis/.ccache/node out/Release/node
- ln -fs out/Release/node node
- cp /home/travis/.ccache/cctest out/Release/cctest
- touch config.gypi
script:
- pyenv global ${PYTHON_VERSION}
- out/Release/cctest
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
- name: "Linter"
language: node_js
node_js: "node"
install:
- pyenv global ${PYTHON_VERSION}
- make lint-py-build || true
script:
- NODE=$(which node) make lint lint-py
- name: "First commit message adheres to guidelines at <a href=\"https://goo.gl/p2fr5Q\">https://goo.gl/p2fr5Q</a>"
if: type = pull_request
language: node_js
node_js: "node"
script:
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
fi
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Code of Conduct
The Node.js Code of Conduct document has moved to
https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md. Please update
links to this document accordingly.
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Security
If you find a security vulnerability in Node.js, please report it to
security@nodejs.org. Please withhold public disclosure until after the security
team has addressed the vulnerability.
The security team will acknowledge your email within 24 hours. You will receive
a more detailed response within 48 hours.
There are no hard and fast rules to determine if a bug is worth reporting as a
security issue. Here are some examples of past issues and what the Security
Response Team thinks of them. When in doubt, please do send us a report
nonetheless.
## Public disclosure preferred
- [#14519](https://github.com/nodejs/node/issues/14519): _Internal domain
function can be used to cause segfaults_. Requires the ability to execute
arbitrary JavaScript code. That is already the highest level of privilege
possible.
## Private disclosure preferred
- [CVE-2016-7099](https://nodejs.org/en/blog/vulnerability/september-2016-security-releases/):
_Fix invalid wildcard certificate validation check_. This was a high-severity
defect. It caused Node.js TLS clients to accept invalid wildcard certificates.
- [#5507](https://github.com/nodejs/node/pull/5507): _Fix a defect that makes
the CacheBleed Attack possible_. Many, though not all, OpenSSL vulnerabilities
in the TLS/SSL protocols also affect Node.js.
- [CVE-2016-2216](https://nodejs.org/en/blog/vulnerability/february-2016-security-releases/):
_Fix defects in HTTP header parsing for requests and responses that can allow
response splitting_. This was a remotely-exploitable defect in the Node.js
HTTP implementation.
When in doubt, please do send us a report.
This diff is collapsed.
'use strict';
const readline = require('readline');
function pad(input, minLength, fill) {
const result = String(input);
const padding = fill.repeat(Math.max(0, minLength - result.length));
return `${padding}${result}`;
}
function fraction(numerator, denominator) {
const fdenominator = String(denominator);
const fnumerator = pad(numerator, fdenominator.length, ' ');
return `${fnumerator}/${fdenominator}`;
}
function getTime(diff) {
const time = Math.ceil(diff[0] + diff[1] / 1e9);
const hours = pad(Math.floor(time / 3600), 2, '0');
const minutes = pad(Math.floor((time % 3600) / 60), 2, '0');
const seconds = pad((time % 3600) % 60, 2, '0');
return `${hours}:${minutes}:${seconds}`;
}
// A run is an item in the job queue: { binary, filename, iter }
// A config is an item in the subqueue: { binary, filename, iter, configs }
class BenchmarkProgress {
constructor(queue, benchmarks) {
this.queue = queue; // Scheduled runs.
this.benchmarks = benchmarks; // Filenames of scheduled benchmarks.
this.completedRuns = 0; // Number of completed runs.
this.scheduledRuns = queue.length; // Number of scheduled runs.
// Time when starting to run benchmarks.
this.startTime = process.hrtime();
// Number of times each file will be run (roughly).
this.runsPerFile = queue.length / benchmarks.length;
this.currentFile = ''; // Filename of current benchmark.
// Number of configurations already run for the current file.
this.completedConfig = 0;
// Total number of configurations for the current file
this.scheduledConfig = 0;
this.interval; // Updates the elapsed time.
}
startQueue(index) {
this.kStartOfQueue = index;
this.currentFile = this.queue[index].filename;
this.interval = setInterval(() => {
if (this.completedRuns === this.scheduledRuns) {
clearInterval(this.interval);
} else {
this.updateProgress();
}
}, 1000);
}
startSubqueue(data, index) {
// This subqueue is generated by a new benchmark
if (data.name !== this.currentFile || index === this.kStartOfQueue) {
this.currentFile = data.name;
this.scheduledConfig = data.queueLength;
}
this.completedConfig = 0;
this.updateProgress();
}
completeConfig() {
this.completedConfig++;
this.updateProgress();
}
completeRun() {
this.completedRuns++;
this.updateProgress();
}
getProgress() {
// Get time as soon as possible.
const diff = process.hrtime(this.startTime);
const completedRuns = this.completedRuns;
const scheduledRuns = this.scheduledRuns;
const finished = completedRuns === scheduledRuns;
// Calculate numbers for fractions.
const runsPerFile = this.runsPerFile;
const completedFiles = Math.floor(completedRuns / runsPerFile);
const scheduledFiles = this.benchmarks.length;
const completedRunsForFile =
finished ? runsPerFile : completedRuns % runsPerFile;
const completedConfig = this.completedConfig;
const scheduledConfig = this.scheduledConfig;
// Calculate the percentage.
let runRate = 0; // Rate of current incomplete run.
if (completedConfig !== scheduledConfig) {
runRate = completedConfig / scheduledConfig;
}
const completedRate = ((completedRuns + runRate) / scheduledRuns);
const percent = pad(Math.floor(completedRate * 100), 3, ' ');
const caption = finished ? 'Done\n' : this.currentFile;
return `[${getTime(diff)}|% ${percent}| ` +
`${fraction(completedFiles, scheduledFiles)} files | ` +
`${fraction(completedRunsForFile, runsPerFile)} runs | ` +
`${fraction(completedConfig, scheduledConfig)} configs]: ` +
`${caption} `;
}
updateProgress() {
if (!process.stderr.isTTY || process.stdout.isTTY) {
return;
}
readline.clearLine(process.stderr);
readline.cursorTo(process.stderr, 0);
process.stderr.write(this.getProgress());
}
}
module.exports = BenchmarkProgress;