diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 4ce11257b707f2..6577ccf125a195 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -567,3 +567,19 @@ When the LTS working group determines that a new LTS release is required, selected commits will be picked from the staging branch to be included in the release. This process of making a release will be a collaboration between the LTS working group and the Release team. + +## Licensing and Copyright Headers + +All `*.js`, `*.cc\, and `*.h` files located in the `/lib' and `/src` folders +*must* have an appropriate copyright statement and SPDX license identifier +*only if it does not already have an existing copyright statement and license +identifier.* + +```js +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT +``` + +Existing copyright statements and license identifiers within any source file +*must not be modified or removed* without review and sign-off by both the +Node.js Technical Steering Committee (TSC) and Node.js Foundation Board. diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index d8e34f85b5759d..5d6b58e3217319 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -3,3 +3,4 @@ rules: require-buffer: 2 buffer-constructor: 2 no-let-in-for-declaration: 2 + no-copyright: 2 diff --git a/lib/_debug_agent.js b/lib/_debug_agent.js index eedca7ef5843bb..deb210391e6eb1 100644 --- a/lib/_debug_agent.js +++ b/lib/_debug_agent.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const assert = require('assert'); diff --git a/lib/_debugger.js b/lib/_debugger.js index d3bf1f9ffa2dab..2e0e283c8b2791 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const internalUtil = require('internal/util'); diff --git a/lib/_http_agent.js b/lib/_http_agent.js index eebdb242463b5d..52c3b52ec50c3f 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const net = require('net'); diff --git a/lib/_http_client.js b/lib/_http_client.js index e8285fe81012c7..7b3bc0579a2b21 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/_http_common.js b/lib/_http_common.js index b8724f00ec6557..237de09f035806 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const binding = process.binding('http_parser'); diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index 53419323f46b0d..c8b0645d6755c9 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index f9df7817512519..d66be3d886d4e4 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const assert = require('assert').ok; diff --git a/lib/_http_server.js b/lib/_http_server.js index 80880be46bb9e5..6b732d268ae20d 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/_linklist.js b/lib/_linklist.js index 1d2e9fa4d4411a..d3bd0f54df4085 100644 --- a/lib/_linklist.js +++ b/lib/_linklist.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; module.exports = require('internal/linkedlist'); diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js index bf498f623c743d..7905146bf302e9 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // a duplex stream is just a stream that is both readable and writable. // Since JS doesn't have multiple prototypal inheritance, this class // prototypally inherits from Readable, and then parasitically from diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js index 30952d436e3d38..bb35f31c8b8dc7 100644 --- a/lib/_stream_passthrough.js +++ b/lib/_stream_passthrough.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // a passthrough stream. // basically just the most minimal sort of Transform stream. // Every written chunk gets output as-is. diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index d6af8589f3bc85..2729c3543bf3ce 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; module.exports = Readable; diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 892c80459a3649..6e8968db575141 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where diff --git a/lib/_stream_wrap.js b/lib/_stream_wrap.js index fbc32965980e96..2f6050956087f8 100644 --- a/lib/_stream_wrap.js +++ b/lib/_stream_wrap.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const assert = require('assert'); diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index eedeb56e125db0..28e072913f1ade 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. diff --git a/lib/_tls_common.js b/lib/_tls_common.js index 107c3bb2ea7c67..539985fcc36a4d 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const internalUtil = require('internal/util'); diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index 83ee3e0f8f5cda..1712ffba55a68d 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; require('internal/util').assertCrypto(); diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 721cdde142519c..b3d0ce234a1c59 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; require('internal/util').assertCrypto(); diff --git a/lib/assert.js b/lib/assert.js index 7f69ba0c60e476..7f8614b491003d 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // http://wiki.commonjs.org/wiki/Unit_Testing/1.0 // // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! diff --git a/lib/buffer.js b/lib/buffer.js index cb93d7e2488f3b..f85594393ad479 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + /* eslint-disable require-buffer */ 'use strict'; diff --git a/lib/child_process.js b/lib/child_process.js index 409dfff170cf4a..02d3b10fa0f945 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/cluster.js b/lib/cluster.js index 02bf3d8f600776..d1eb67f6b062e2 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; module.exports = ('NODE_UNIQUE_ID' in process.env) ? diff --git a/lib/console.js b/lib/console.js index ba92c91636ba38..cd14a7ba1e396f 100644 --- a/lib/console.js +++ b/lib/console.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/constants.js b/lib/constants.js index c1cbf2db3cce37..1a38ecff8eb2d8 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // This module is deprecated in documentation only. Users should be directed diff --git a/lib/crypto.js b/lib/crypto.js index 2d4695dc97e6fb..7f1d329b39ec18 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Note: In 0.8 and before, crypto functions all defaulted to using // binary-encoded strings rather than buffers. diff --git a/lib/dgram.js b/lib/dgram.js index 1fd83094de2e7b..314406897bfa64 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const assert = require('assert'); diff --git a/lib/dns.js b/lib/dns.js index cbb994b8f271de..3be9129616b25e 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/domain.js b/lib/domain.js index f45a623e8acafd..ef7b689d56e45e 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // WARNING: THIS MODULE IS PENDING DEPRECATION. diff --git a/lib/events.js b/lib/events.js index 000fa98d5a88c5..4dc7ea82235c48 100644 --- a/lib/events.js +++ b/lib/events.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; var domain; diff --git a/lib/fs.js b/lib/fs.js index fae2857e3fc759..2fac8424878d29 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Maintainers, keep in mind that ES1-style octal literals (`0666`) are not // allowed in strict mode. Use ES6-style octal literals instead (`0o666`). diff --git a/lib/http.js b/lib/http.js index 6931a0e26c138a..03084d755edb4b 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; exports.IncomingMessage = require('_http_incoming').IncomingMessage; diff --git a/lib/https.js b/lib/https.js index e59e7dfcb6beeb..398390bd28a379 100644 --- a/lib/https.js +++ b/lib/https.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; require('internal/util').assertCrypto(); diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index efdbc5d9e3ac48..f5d5e83f707678 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Hello, and welcome to hacking node.js! // // This file is invoked by node::LoadEnvironment in src/node.cc, and is diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index 744bf2dcab6ec4..3d64d0afc94986 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; if (!process.binding('config').hasIntl) { diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 3c8764fc2ed092..9e972dbf8577aa 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const StringDecoder = require('string_decoder').StringDecoder; diff --git a/lib/internal/cluster/child.js b/lib/internal/cluster/child.js index 3275eec720c738..e96f56e2c95e9d 100644 --- a/lib/internal/cluster/child.js +++ b/lib/internal/cluster/child.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const assert = require('assert'); const util = require('util'); diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js index 9d5062f5427ffa..e6f7b6958ae388 100644 --- a/lib/internal/cluster/master.js +++ b/lib/internal/cluster/master.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const assert = require('assert'); const fork = require('child_process').fork; diff --git a/lib/internal/cluster/round_robin_handle.js b/lib/internal/cluster/round_robin_handle.js index 5dbc205426b1db..f4f3ead4185783 100644 --- a/lib/internal/cluster/round_robin_handle.js +++ b/lib/internal/cluster/round_robin_handle.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const assert = require('assert'); const net = require('net'); diff --git a/lib/internal/cluster/shared_handle.js b/lib/internal/cluster/shared_handle.js index c0663772426213..8cf8d2f6cd8a35 100644 --- a/lib/internal/cluster/shared_handle.js +++ b/lib/internal/cluster/shared_handle.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const assert = require('assert'); const dgram = require('dgram'); diff --git a/lib/internal/cluster/utils.js b/lib/internal/cluster/utils.js index ba72ff90945d3c..a9430e5ce4044b 100644 --- a/lib/internal/cluster/utils.js +++ b/lib/internal/cluster/utils.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const util = require('util'); diff --git a/lib/internal/cluster/worker.js b/lib/internal/cluster/worker.js index 687e4c12fecea4..bcf5157c604247 100644 --- a/lib/internal/cluster/worker.js +++ b/lib/internal/cluster/worker.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const EventEmitter = require('events'); const internalUtil = require('internal/util'); diff --git a/lib/internal/freelist.js b/lib/internal/freelist.js index 580726e8725379..b8748a928b1165 100644 --- a/lib/internal/freelist.js +++ b/lib/internal/freelist.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // This is a free list to avoid creating so many of the same object. diff --git a/lib/internal/fs.js b/lib/internal/fs.js index 881679f99c4000..efe1467120a552 100644 --- a/lib/internal/fs.js +++ b/lib/internal/fs.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const Buffer = require('buffer').Buffer; diff --git a/lib/internal/linkedlist.js b/lib/internal/linkedlist.js index 40bca91de25803..3d12f8fcce83f9 100644 --- a/lib/internal/linkedlist.js +++ b/lib/internal/linkedlist.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; function init(list) { diff --git a/lib/internal/module.js b/lib/internal/module.js index 2f38618daac5f7..a18b43b53cc941 100644 --- a/lib/internal/module.js +++ b/lib/internal/module.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; exports = module.exports = { diff --git a/lib/internal/net.js b/lib/internal/net.js index d19bc4c219a796..7a1c41678888ce 100644 --- a/lib/internal/net.js +++ b/lib/internal/net.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; module.exports = { isLegalPort, assertPort }; diff --git a/lib/internal/process.js b/lib/internal/process.js index 3f050b42cafe42..63fbeebd961eca 100644 --- a/lib/internal/process.js +++ b/lib/internal/process.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; var _lazyConstants = null; diff --git a/lib/internal/process/next_tick.js b/lib/internal/process/next_tick.js index f27ef622a96e6a..4e9c12475b229b 100644 --- a/lib/internal/process/next_tick.js +++ b/lib/internal/process/next_tick.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; exports.setup = setupNextTick; diff --git a/lib/internal/process/promises.js b/lib/internal/process/promises.js index 0e382d11d5523b..d64d8c5cc2f81f 100644 --- a/lib/internal/process/promises.js +++ b/lib/internal/process/promises.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const promiseRejectEvent = process._promiseRejectEvent; diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js index cf69657e40583e..35e91cf3434610 100644 --- a/lib/internal/process/stdio.js +++ b/lib/internal/process/stdio.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; exports.setup = setupStdio; diff --git a/lib/internal/process/warning.js b/lib/internal/process/warning.js index bf487f38a417c4..baf9f916a8e894 100644 --- a/lib/internal/process/warning.js +++ b/lib/internal/process/warning.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const config = process.binding('config'); diff --git a/lib/internal/readline.js b/lib/internal/readline.js index 60fe946560aaaa..35fbfb19c14f3a 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // Regex used for ansi escape code splitting diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 7782d6b84bb8fe..59467d48d02708 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const Interface = require('readline').Interface; diff --git a/lib/internal/socket_list.js b/lib/internal/socket_list.js index 0f4be6df239dd6..040dda66465f2e 100644 --- a/lib/internal/socket_list.js +++ b/lib/internal/socket_list.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; module.exports = {SocketListSend, SocketListReceive}; diff --git a/lib/internal/streams/BufferList.js b/lib/internal/streams/BufferList.js index 76da94bc83d977..b0980e2fdd47a5 100644 --- a/lib/internal/streams/BufferList.js +++ b/lib/internal/streams/BufferList.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const Buffer = require('buffer').Buffer; diff --git a/lib/internal/streams/lazy_transform.js b/lib/internal/streams/lazy_transform.js index bd68bef4b6dd17..87ecf7c117b3df 100644 --- a/lib/internal/streams/lazy_transform.js +++ b/lib/internal/streams/lazy_transform.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // LazyTransform is a special type of Transform stream that is lazily loaded. // This is used for performance with bi-API-ship: when two APIs are available // for the stream, one conventional and one non-conventional. diff --git a/lib/internal/streams/legacy.js b/lib/internal/streams/legacy.js index 3242b15eabdb0d..1f976b0118bc42 100644 --- a/lib/internal/streams/legacy.js +++ b/lib/internal/streams/legacy.js @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT 'use strict'; const EE = require('events'); diff --git a/lib/internal/url.js b/lib/internal/url.js index 2e3fec18fbae65..2cdb5be9112118 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/internal/util.js b/lib/internal/util.js index 10844b645455dd..9c7ed70957e204 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const binding = process.binding('util'); diff --git a/lib/internal/v8_prof_processor.js b/lib/internal/v8_prof_processor.js index 105ca30b12b705..b44e471176bc95 100644 --- a/lib/internal/v8_prof_processor.js +++ b/lib/internal/v8_prof_processor.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + /* eslint-disable strict */ const scriptFiles = [ 'internal/v8_prof_polyfill', diff --git a/lib/module.js b/lib/module.js index 9a6b641a753588..2eead5a60767f7 100644 --- a/lib/module.js +++ b/lib/module.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const NativeModule = require('native_module'); diff --git a/lib/net.js b/lib/net.js index 121309895343b7..c39f206a84a8d1 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const EventEmitter = require('events'); diff --git a/lib/os.js b/lib/os.js index 7ab0ec5fa423be..5b8012b4f6149d 100644 --- a/lib/os.js +++ b/lib/os.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const binding = process.binding('os'); diff --git a/lib/path.js b/lib/path.js index 3ed587e0e0e167..22b95898fdbc58 100644 --- a/lib/path.js +++ b/lib/path.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const inspect = require('util').inspect; diff --git a/lib/process.js b/lib/process.js index 43c8bf96f0bd48..45b980237589f4 100644 --- a/lib/process.js +++ b/lib/process.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // Re-export process as a native module diff --git a/lib/querystring.js b/lib/querystring.js index 9b4ca27640aa71..c7e7d073e35ed3 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -1,3 +1,8 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + +// Query String Utilities + 'use strict'; const QueryString = module.exports = { diff --git a/lib/readline.js b/lib/readline.js index f1b9db46af6ee1..27e08b1d670406 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Inspiration for this code comes from Salvatore Sanfilippo's linenoise. // https://github.com/antirez/linenoise // Reference: diff --git a/lib/repl.js b/lib/repl.js index fed89146dc9af7..e31f6d1e0f57e1 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + /* A repl library that you can include in your own code to get a runtime * interface to your program. * diff --git a/lib/stream.js b/lib/stream.js index a6b25a212508ab..47d1af530be5cd 100644 --- a/lib/stream.js +++ b/lib/stream.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // Note: export Stream before Readable/Writable/Duplex/... diff --git a/lib/string_decoder.js b/lib/string_decoder.js index 672ba185cc2821..7f9dcb77343b32 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const Buffer = require('buffer').Buffer; diff --git a/lib/sys.js b/lib/sys.js index 4d7d305daa056b..f03d81ac23eb2b 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; // the sys module was renamed to 'util'. diff --git a/lib/timers.js b/lib/timers.js index 6d456da36faf67..68e104346803ad 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const TimerWrap = process.binding('timer_wrap').Timer; diff --git a/lib/tls.js b/lib/tls.js index bb4719d9b02c93..e18c14adc69e09 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const internalUtil = require('internal/util'); diff --git a/lib/tty.js b/lib/tty.js index 576144e4013064..0e3a004a715bb1 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const util = require('util'); diff --git a/lib/url.js b/lib/url.js index 2b7dd6e5321977..31821069c470ff 100644 --- a/lib/url.js +++ b/lib/url.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; function importPunycode() { diff --git a/lib/util.js b/lib/util.js index 46cde4d85bf28b..bd1457f46a41e7 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const uv = process.binding('uv'); diff --git a/lib/v8.js b/lib/v8.js index 415aed593eb799..043c636ee77184 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Copyright (c) 2014, StrongLoop Inc. // // Permission to use, copy, modify, and/or distribute this software for any diff --git a/lib/vm.js b/lib/vm.js index cf672fbbc14871..0cc1e70aea0ca1 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const binding = process.binding('contextify'); diff --git a/lib/zlib.js b/lib/zlib.js index b6817749bae35d..ad49d744800d4a 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + 'use strict'; const Buffer = require('buffer').Buffer; diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 64b5f091612368..e0447f538b7dc7 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_ASYNC_WRAP_INL_H_ #define SRC_ASYNC_WRAP_INL_H_ diff --git a/src/async-wrap.cc b/src/async-wrap.cc index a0780566db72d8..a05363ff6b42b6 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/async-wrap.h b/src/async-wrap.h index d01c6ce9f9b724..9cc590bf152727 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_ASYNC_WRAP_H_ #define SRC_ASYNC_WRAP_H_ diff --git a/src/backtrace_posix.cc b/src/backtrace_posix.cc index 8fd798757a544a..8f8e2733e0d227 100644 --- a/src/backtrace_posix.cc +++ b/src/backtrace_posix.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #if defined(__linux__) diff --git a/src/backtrace_win32.cc b/src/backtrace_win32.cc index 71610fd663bb3c..9ce935d6f0f53b 100644 --- a/src/backtrace_win32.cc +++ b/src/backtrace_win32.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" namespace node { diff --git a/src/base-object-inl.h b/src/base-object-inl.h index 4ddc5e1349bc13..e5a617d384f39d 100644 --- a/src/base-object-inl.h +++ b/src/base-object-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MITE + #ifndef SRC_BASE_OBJECT_INL_H_ #define SRC_BASE_OBJECT_INL_H_ diff --git a/src/base-object.h b/src/base-object.h index 27251379770e2c..95ef099e78aa28 100644 --- a/src/base-object.h +++ b/src/base-object.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_BASE_OBJECT_H_ #define SRC_BASE_OBJECT_H_ diff --git a/src/base64.h b/src/base64.h index 64c4e330c0db84..3a9b42f65e16fe 100644 --- a/src/base64.h +++ b/src/base64.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_BASE64_H_ #define SRC_BASE64_H_ diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 2b61209f6e643a..ccadfba3586bb1 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #define CARES_STATICLIB #include "ares.h" #include "async-wrap.h" diff --git a/src/connect_wrap.cc b/src/connect_wrap.cc index df3f093e732972..cf719e8ed9bbef 100644 --- a/src/connect_wrap.cc +++ b/src/connect_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "connect_wrap.h" #include "env.h" diff --git a/src/connect_wrap.h b/src/connect_wrap.h index 28d4872d7ed416..fbfad1dc0e3552 100644 --- a/src/connect_wrap.h +++ b/src/connect_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_CONNECT_WRAP_H_ #define SRC_CONNECT_WRAP_H_ diff --git a/src/connection_wrap.cc b/src/connection_wrap.cc index 020fe8b4c9508c..44c0a4e38d29a6 100644 --- a/src/connection_wrap.cc +++ b/src/connection_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "connection_wrap.h" #include "connect_wrap.h" diff --git a/src/connection_wrap.h b/src/connection_wrap.h index 7af97fd3f05e1b..05606f0b76ac4f 100644 --- a/src/connection_wrap.h +++ b/src/connection_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_CONNECTION_WRAP_H_ #define SRC_CONNECTION_WRAP_H_ diff --git a/src/debug-agent.cc b/src/debug-agent.cc index 2d8ed8afc980ec..8179684c9422e6 100644 --- a/src/debug-agent.cc +++ b/src/debug-agent.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Copyright Fedor Indutny and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/debug-agent.h b/src/debug-agent.h index 0faa25f12470a9..7f52923afb126b 100644 --- a/src/debug-agent.h +++ b/src/debug-agent.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Copyright Fedor Indutny and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/env-inl.h b/src/env-inl.h index 1a17e2947d0597..3680abf325a9af 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_ENV_INL_H_ #define SRC_ENV_INL_H_ diff --git a/src/env.cc b/src/env.cc index 40f0c9ebd66a07..96bc59a6cc07ea 100644 --- a/src/env.cc +++ b/src/env.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "env.h" #include "env-inl.h" #include "async-wrap.h" diff --git a/src/env.h b/src/env.h index 581d7e9aef3c67..cd832b9b9dca0a 100644 --- a/src/env.h +++ b/src/env.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_ENV_H_ #define SRC_ENV_H_ diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 025f511d93b1a5..96adb6b783dde4 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 317fb48b1d28e3..b043a8615e56db 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "handle_wrap.h" #include "async-wrap.h" #include "async-wrap-inl.h" diff --git a/src/handle_wrap.h b/src/handle_wrap.h index 2a128dd8b1679d..58afb95485d97a 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_HANDLE_WRAP_H_ #define SRC_HANDLE_WRAP_H_ diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index ae2e666384b5af..d4f6b7618db50c 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "inspector_agent.h" #include "inspector_socket_server.h" diff --git a/src/inspector_agent.h b/src/inspector_agent.h index 9cc2fa676d4d13..f64a6ac336ce24 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_INSPECTOR_AGENT_H_ #define SRC_INSPECTOR_AGENT_H_ diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc index 6edc08248b6a85..07620f1d71142f 100644 --- a/src/inspector_socket.cc +++ b/src/inspector_socket.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "inspector_socket.h" #include "util.h" #include "util-inl.h" diff --git a/src/inspector_socket.h b/src/inspector_socket.h index 558d87bcb76bf1..500501d278357a 100644 --- a/src/inspector_socket.h +++ b/src/inspector_socket.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_INSPECTOR_SOCKET_H_ #define SRC_INSPECTOR_SOCKET_H_ diff --git a/src/inspector_socket_server.cc b/src/inspector_socket_server.cc index ee44a69a683690..9cb3d22d62c1ef 100644 --- a/src/inspector_socket_server.cc +++ b/src/inspector_socket_server.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "inspector_socket_server.h" #include "node.h" diff --git a/src/inspector_socket_server.h b/src/inspector_socket_server.h index b82d9ee6013a40..5e3226345ab785 100644 --- a/src/inspector_socket_server.h +++ b/src/inspector_socket_server.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_INSPECTOR_SOCKET_SERVER_H_ #define SRC_INSPECTOR_SOCKET_SERVER_H_ diff --git a/src/js_stream.cc b/src/js_stream.cc index e51c4ae9b35084..f0a6d7156861b7 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "js_stream.h" #include "async-wrap.h" diff --git a/src/js_stream.h b/src/js_stream.h index 5a1244bc463e36..81d67ef1e4932b 100644 --- a/src/js_stream.h +++ b/src/js_stream.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_JS_STREAM_H_ #define SRC_JS_STREAM_H_ diff --git a/src/node.cc b/src/node.cc index a678c177f3db79..c8db321747ea1a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_buffer.h" #include "node_constants.h" diff --git a/src/node.h b/src/node.h index 1255a4af7f11ce..b3258a8332289e 100644 --- a/src/node.h +++ b/src/node.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_H_ #define SRC_NODE_H_ diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 1f86cf8b3f7ae5..fa2c9eb9ce0792 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_buffer.h" diff --git a/src/node_buffer.h b/src/node_buffer.h index 686450d984e6f9..0882d897787c21 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_BUFFER_H_ #define SRC_NODE_BUFFER_H_ diff --git a/src/node_config.cc b/src/node_config.cc index 60001207f1851b..680932e4e817bd 100644 --- a/src/node_config.cc +++ b/src/node_config.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_i18n.h" #include "env.h" diff --git a/src/node_constants.cc b/src/node_constants.cc index 8aa65ee7e23c35..51be933d5c4a20 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_constants.h" #include "env.h" #include "env-inl.h" diff --git a/src/node_constants.h b/src/node_constants.h index 7ba6ec3bd1b015..b83bfe39fb549d 100644 --- a/src/node_constants.h +++ b/src/node_constants.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_CONSTANTS_H_ #define SRC_NODE_CONSTANTS_H_ diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 4efb420fa128b7..7ee5a2dee9da1f 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_internals.h" #include "node_watchdog.h" diff --git a/src/node_counters.cc b/src/node_counters.cc index 092d990d16b3e5..6c0ccb5d4b288d 100644 --- a/src/node_counters.cc +++ b/src/node_counters.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_counters.h" #include "uv.h" #include "env.h" diff --git a/src/node_counters.h b/src/node_counters.h index 117db1079e9865..e3a5e8c484549a 100644 --- a/src/node_counters.h +++ b/src/node_counters.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_COUNTERS_H_ #define SRC_NODE_COUNTERS_H_ diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 283d84f82d37c7..189312df6b897d 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_buffer.h" #include "node_crypto.h" diff --git a/src/node_crypto.h b/src/node_crypto.h index 175206c40df586..4a32e7b2669fdc 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_CRYPTO_H_ #define SRC_NODE_CRYPTO_H_ diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index a862573c280acb..920a701eb7fadc 100644 --- a/src/node_crypto_bio.cc +++ b/src/node_crypto_bio.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_crypto_bio.h" #include "openssl/bio.h" #include "util.h" diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h index ed6b46b53237cf..65656e3a29bdad 100644 --- a/src/node_crypto_bio.h +++ b/src/node_crypto_bio.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_CRYPTO_BIO_H_ #define SRC_NODE_CRYPTO_BIO_H_ diff --git a/src/node_crypto_clienthello-inl.h b/src/node_crypto_clienthello-inl.h index 108383bf2d542a..43d87cd25af150 100644 --- a/src/node_crypto_clienthello-inl.h +++ b/src/node_crypto_clienthello-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ #define SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ diff --git a/src/node_crypto_clienthello.cc b/src/node_crypto_clienthello.cc index 8c862c1b6a5198..8b7a799f2a8425 100644 --- a/src/node_crypto_clienthello.cc +++ b/src/node_crypto_clienthello.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_crypto_clienthello.h" #include "node_crypto_clienthello-inl.h" #include "node_buffer.h" // Buffer diff --git a/src/node_crypto_clienthello.h b/src/node_crypto_clienthello.h index 3550807c20d05f..702cef92d61176 100644 --- a/src/node_crypto_clienthello.h +++ b/src/node_crypto_clienthello.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_CRYPTO_CLIENTHELLO_H_ #define SRC_NODE_CRYPTO_CLIENTHELLO_H_ diff --git a/src/node_crypto_groups.h b/src/node_crypto_groups.h index 2817f4c92620af..131e56d38bb15d 100644 --- a/src/node_crypto_groups.h +++ b/src/node_crypto_groups.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_CRYPTO_GROUPS_H_ #define SRC_NODE_CRYPTO_GROUPS_H_ diff --git a/src/node_debug_options.cc b/src/node_debug_options.cc index 410e23acb3101b..d741573d2bfcc6 100644 --- a/src/node_debug_options.cc +++ b/src/node_debug_options.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_debug_options.h" #include diff --git a/src/node_debug_options.h b/src/node_debug_options.h index d03bdb15497bbf..f3c105fdabff4f 100644 --- a/src/node_debug_options.h +++ b/src/node_debug_options.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_DEBUG_OPTIONS_H_ #define SRC_NODE_DEBUG_OPTIONS_H_ diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 8653b673755fde..6c090e91af330a 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_dtrace.h" #ifdef HAVE_DTRACE diff --git a/src/node_dtrace.h b/src/node_dtrace.h index 5d192a60f716aa..5095d0f7510937 100644 --- a/src/node_dtrace.h +++ b/src/node_dtrace.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_DTRACE_H_ #define SRC_NODE_DTRACE_H_ diff --git a/src/node_file.cc b/src/node_file.cc index 0abb88088786ae..03c5d26cb999b4 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_file.h" #include "node_buffer.h" diff --git a/src/node_file.h b/src/node_file.h index 76dbe80348de39..c95860f6857c2a 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_FILE_H_ #define SRC_NODE_FILE_H_ diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index f757cd6797058d..304e436f9e292f 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_buffer.h" #include "node_http_parser.h" diff --git a/src/node_http_parser.h b/src/node_http_parser.h index 5fbe6f130594a6..17489ffacca410 100644 --- a/src/node_http_parser.h +++ b/src/node_http_parser.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_HTTP_PARSER_H_ #define SRC_NODE_HTTP_PARSER_H_ diff --git a/src/node_i18n.cc b/src/node_i18n.cc index a98fdca4d1bffd..e9784a56b9c496 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + /* * notes: by srl295 * - When in NODE_HAVE_SMALL_ICU mode, ICU is linked against "stub" (null) data diff --git a/src/node_i18n.h b/src/node_i18n.h index 21a579526ddc1a..7687e0e5b4b1f2 100644 --- a/src/node_i18n.h +++ b/src/node_i18n.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_I18N_H_ #define SRC_NODE_I18N_H_ diff --git a/src/node_internals.h b/src/node_internals.h index 7c1b79d62f09c5..b8e9f134376bb8 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_INTERNALS_H_ #define SRC_NODE_INTERNALS_H_ diff --git a/src/node_javascript.cc b/src/node_javascript.cc index 3f6d6c82a85269..060ae063c3b395 100644 --- a/src/node_javascript.cc +++ b/src/node_javascript.cc @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT #include "node.h" #include "node_natives.h" #include "v8.h" diff --git a/src/node_javascript.h b/src/node_javascript.h index 738d81957253e2..e70b6ee631a52a 100644 --- a/src/node_javascript.h +++ b/src/node_javascript.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_JAVASCRIPT_H_ #define SRC_NODE_JAVASCRIPT_H_ diff --git a/src/node_lttng.cc b/src/node_lttng.cc index 490beb6e40007d..39c28c8ef90c1b 100644 --- a/src/node_lttng.cc +++ b/src/node_lttng.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "util.h" #ifdef HAVE_LTTNG diff --git a/src/node_lttng.h b/src/node_lttng.h index edd802eb6e49f7..80fe49496edf6b 100644 --- a/src/node_lttng.h +++ b/src/node_lttng.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_LTTNG_H_ #define SRC_NODE_LTTNG_H_ diff --git a/src/node_lttng_provider.h b/src/node_lttng_provider.h index 5913f39752caba..37aaff5985c4fd 100644 --- a/src/node_lttng_provider.h +++ b/src/node_lttng_provider.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_LTTNG_PROVIDER_H_ #define SRC_NODE_LTTNG_PROVIDER_H_ diff --git a/src/node_lttng_tp.h b/src/node_lttng_tp.h index b529bfad5e4b58..7596349a62b9f0 100644 --- a/src/node_lttng_tp.h +++ b/src/node_lttng_tp.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_LTTNG_TP_H_ #define SRC_NODE_LTTNG_TP_H_ diff --git a/src/node_main.cc b/src/node_main.cc index 16bda81ae64091..7a95d3bed28425 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #ifdef _WIN32 diff --git a/src/node_mutex.h b/src/node_mutex.h index 9e1d31654f7dbf..f47c7eb9fc2ae3 100644 --- a/src/node_mutex.h +++ b/src/node_mutex.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_MUTEX_H_ #define SRC_NODE_MUTEX_H_ diff --git a/src/node_object_wrap.h b/src/node_object_wrap.h index 8f695fd9dd0679..767aa1fc610595 100644 --- a/src/node_object_wrap.h +++ b/src/node_object_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_OBJECT_WRAP_H_ #define SRC_NODE_OBJECT_WRAP_H_ diff --git a/src/node_os.cc b/src/node_os.cc index 97b1a1d08da6ed..adf35d2c8d7d70 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "v8.h" #include "env.h" diff --git a/src/node_revert.cc b/src/node_revert.cc index 48f03a89a3131e..bc22054d4d05cd 100644 --- a/src/node_revert.cc +++ b/src/node_revert.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_revert.h" #include #include diff --git a/src/node_revert.h b/src/node_revert.h index b4c3633e947a6e..a0009021923a74 100644 --- a/src/node_revert.h +++ b/src/node_revert.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_REVERT_H_ #define SRC_NODE_REVERT_H_ @@ -6,10 +9,10 @@ #include "node.h" /** - * Note that it is expected for this list to vary across specific LTS and - * Stable versions! Only CVE's whose fixes require *breaking* changes within - * a given LTS or Stable may be added to this list, and only with CTC - * consensus. + * Note that it is expected for this list to vary across specific LTS and + * Stable versions! Only CVE's whose fixes require *breaking* changes within + * a given LTS or Stable may be added to this list, and only with CTC + * consensus. * * For *master* this list should always be empty! * diff --git a/src/node_root_certs.h b/src/node_root_certs.h index 972c1d33248500..13bdf900fb10e6 100644 --- a/src/node_root_certs.h +++ b/src/node_root_certs.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS /* GlobalSign Root CA */ diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index cff92e34045a1e..41ab7561bd6a90 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT #include "node_stat_watcher.h" #include "async-wrap.h" #include "async-wrap-inl.h" diff --git a/src/node_stat_watcher.h b/src/node_stat_watcher.h index 99cae5880351f7..69572e8f85d37b 100644 --- a/src/node_stat_watcher.h +++ b/src/node_stat_watcher.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_STAT_WATCHER_H_ #define SRC_NODE_STAT_WATCHER_H_ diff --git a/src/node_url.cc b/src/node_url.cc index 0d5e695a3c13a5..ed4ed377c63ecd 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_url.h" #include "node.h" #include "node_internals.h" diff --git a/src/node_url.h b/src/node_url.h index 198c29938b7d22..eb5cffbd3191f2 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_URL_H_ #define SRC_NODE_URL_H_ diff --git a/src/node_util.cc b/src/node_util.cc index a1387353e3d9a5..1734217905703b 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_watchdog.h" #include "v8.h" diff --git a/src/node_v8.cc b/src/node_v8.cc index 7059922607089d..8223d0f7324d78 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "env.h" #include "env-inl.h" diff --git a/src/node_version.h b/src/node_version.h index b7760cf04ba46d..a961bfb343ee2c 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_VERSION_H_ #define SRC_NODE_VERSION_H_ diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 5d95c4132f1b3f..d0ef930216dc6c 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_watchdog.h" #include "node_internals.h" #include "util.h" diff --git a/src/node_watchdog.h b/src/node_watchdog.h index 2d55d782d0af5d..effa2619b46894 100644 --- a/src/node_watchdog.h +++ b/src/node_watchdog.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_WATCHDOG_H_ #define SRC_NODE_WATCHDOG_H_ diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h index efc11ab0b95108..368ba84f15e66d 100644 --- a/src/node_win32_etw_provider-inl.h +++ b/src/node_win32_etw_provider-inl.h @@ -1,3 +1,7 @@ +// Copyright Node.js contributors. All rights reserved. +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ #define SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ diff --git a/src/node_win32_etw_provider.cc b/src/node_win32_etw_provider.cc index 7b766bd2bb99b8..70f426ba73d4b9 100644 --- a/src/node_win32_etw_provider.cc +++ b/src/node_win32_etw_provider.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node_dtrace.h" #include "node_win32_etw_provider.h" #include "node_etw_provider.h" diff --git a/src/node_win32_etw_provider.h b/src/node_win32_etw_provider.h index baf9e38539f559..a1b6ef8ccca4ab 100644 --- a/src/node_win32_etw_provider.h +++ b/src/node_win32_etw_provider.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_WIN32_ETW_PROVIDER_H_ #define SRC_NODE_WIN32_ETW_PROVIDER_H_ diff --git a/src/node_win32_perfctr_provider.cc b/src/node_win32_perfctr_provider.cc index ebb299e4c54758..b19ff111f4746c 100644 --- a/src/node_win32_perfctr_provider.cc +++ b/src/node_win32_perfctr_provider.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #define __INIT_node_perfctr_provider_IMP #include "node_counters.h" #include "node_win32_perfctr_provider.h" diff --git a/src/node_win32_perfctr_provider.h b/src/node_win32_perfctr_provider.h index 315e32b0297e4d..1f6b5d218133f6 100644 --- a/src/node_win32_perfctr_provider.h +++ b/src/node_win32_perfctr_provider.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ #define SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ diff --git a/src/node_wrap.h b/src/node_wrap.h index 15cea7beda7de8..a1763a9dd09935 100644 --- a/src/node_wrap.h +++ b/src/node_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_WRAP_H_ #define SRC_NODE_WRAP_H_ diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 0b85e6a1d60921..3f7d24328beb56 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "node.h" #include "node_buffer.h" diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 5f47dadddb4d96..a940a7f339c177 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "pipe_wrap.h" #include "async-wrap.h" diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h index 9dcfa91bac8579..16e2f1e5410ec3 100644 --- a/src/pipe_wrap.h +++ b/src/pipe_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_PIPE_WRAP_H_ #define SRC_PIPE_WRAP_H_ diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 8c8e4704be4f82..0576bc454ee86f 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "env.h" #include "env-inl.h" #include "handle_wrap.h" diff --git a/src/req-wrap-inl.h b/src/req-wrap-inl.h index 84af22023dc3b9..26d462fb00960b 100644 --- a/src/req-wrap-inl.h +++ b/src/req-wrap-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_REQ_WRAP_INL_H_ #define SRC_REQ_WRAP_INL_H_ diff --git a/src/req-wrap.h b/src/req-wrap.h index 0fddae67460d6f..87f523a6a5e749 100644 --- a/src/req-wrap.h +++ b/src/req-wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_REQ_WRAP_H_ #define SRC_REQ_WRAP_H_ diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index 582d1a9ecfdc02..b008b8106b0b30 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc index 93e51af38f65ae..f1d55cd0a84ab2 100644 --- a/src/spawn_sync.cc +++ b/src/spawn_sync.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "spawn_sync.h" #include "env-inl.h" #include "string_bytes.h" diff --git a/src/spawn_sync.h b/src/spawn_sync.h index 676df43b759bf1..e094f2527d976d 100644 --- a/src/spawn_sync.h +++ b/src/spawn_sync.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_SPAWN_SYNC_H_ #define SRC_SPAWN_SYNC_H_ diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index da636909b695f3..cf654899d4e0bc 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_STREAM_BASE_INL_H_ #define SRC_STREAM_BASE_INL_H_ diff --git a/src/stream_base.cc b/src/stream_base.cc index 3ed622d7ef35a2..4992471861a16e 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "stream_base.h" #include "stream_base-inl.h" #include "stream_wrap.h" diff --git a/src/stream_base.h b/src/stream_base.h index faddee88c82786..1f7c36d024849d 100644 --- a/src/stream_base.h +++ b/src/stream_base.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_STREAM_BASE_H_ #define SRC_STREAM_BASE_H_ diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index ac656505503b22..9e87547a3ea4e2 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -1,3 +1,5 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT #include "stream_wrap.h" #include "stream_base.h" #include "stream_base-inl.h" diff --git a/src/stream_wrap.h b/src/stream_wrap.h index e930670202d2d8..0542e89850e163 100644 --- a/src/stream_wrap.h +++ b/src/stream_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_STREAM_WRAP_H_ #define SRC_STREAM_WRAP_H_ diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 882ca6e3e89bd3..483f862f8864c0 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "string_bytes.h" #include "base64.h" diff --git a/src/string_bytes.h b/src/string_bytes.h index 75d70defe38104..54a5bc91c23bc0 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_STRING_BYTES_H_ #define SRC_STRING_BYTES_H_ diff --git a/src/string_search.cc b/src/string_search.cc index 326fba7c4abf05..0bd224bb63e70c 100644 --- a/src/string_search.cc +++ b/src/string_search.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "string_search.h" namespace node { diff --git a/src/string_search.h b/src/string_search.h index abc69edb87621d..f35b31bf359c95 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Copyright 2011 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index b2617a5695719e..36fc55f88b4c18 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MITE + #include "tcp_wrap.h" #include "connection_wrap.h" diff --git a/src/tcp_wrap.h b/src/tcp_wrap.h index 2b9e288dced6aa..1f1daa92744074 100644 --- a/src/tcp_wrap.h +++ b/src/tcp_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_TCP_WRAP_H_ #define SRC_TCP_WRAP_H_ diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc index 843fde4673b071..8c885795a8def2 100644 --- a/src/timer_wrap.cc +++ b/src/timer_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "async-wrap.h" #include "async-wrap-inl.h" #include "env.h" diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index d56128fec6c5ce..05ad70667fbff5 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "tls_wrap.h" #include "async-wrap.h" #include "async-wrap-inl.h" diff --git a/src/tls_wrap.h b/src/tls_wrap.h index f390c9fe9281f7..aec8bedc7feb0b 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_TLS_WRAP_H_ #define SRC_TLS_WRAP_H_ diff --git a/src/tracing/agent.cc b/src/tracing/agent.cc index ceab09e5a2789c..ad5b5c91a1ed2a 100644 --- a/src/tracing/agent.cc +++ b/src/tracing/agent.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "tracing/agent.h" #include diff --git a/src/tracing/agent.h b/src/tracing/agent.h index f6cb5af97f4bbc..b149635d0f6c8a 100644 --- a/src/tracing/agent.h +++ b/src/tracing/agent.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_TRACING_AGENT_H_ #define SRC_TRACING_AGENT_H_ diff --git a/src/tracing/node_trace_buffer.cc b/src/tracing/node_trace_buffer.cc index 4e99361cbefee3..179e5fddc80742 100644 --- a/src/tracing/node_trace_buffer.cc +++ b/src/tracing/node_trace_buffer.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "tracing/node_trace_buffer.h" namespace node { diff --git a/src/tracing/node_trace_buffer.h b/src/tracing/node_trace_buffer.h index 296c958b80e3fa..57ac2c694d03d3 100644 --- a/src/tracing/node_trace_buffer.h +++ b/src/tracing/node_trace_buffer.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_TRACE_BUFFER_H_ #define SRC_NODE_TRACE_BUFFER_H_ diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc index 41753c5e65e557..25ff5291cd19a2 100644 --- a/src/tracing/node_trace_writer.cc +++ b/src/tracing/node_trace_writer.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "tracing/node_trace_writer.h" #include diff --git a/src/tracing/node_trace_writer.h b/src/tracing/node_trace_writer.h index 5813db0ab1fd33..68c90755b59632 100644 --- a/src/tracing/node_trace_writer.h +++ b/src/tracing/node_trace_writer.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_NODE_TRACE_WRITER_H_ #define SRC_NODE_TRACE_WRITER_H_ diff --git a/src/tracing/trace_event.cc b/src/tracing/trace_event.cc index b83cae6e05c10c..84c3769920932d 100644 --- a/src/tracing/trace_event.cc +++ b/src/tracing/trace_event.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "tracing/trace_event.h" namespace node { diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h index a035fd51500bb9..300fbc3a4bbb81 100644 --- a/src/tracing/trace_event.h +++ b/src/tracing/trace_event.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + // Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index 26f061b99b34e8..0f2e342c4385ea 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "tty_wrap.h" #include "env.h" diff --git a/src/tty_wrap.h b/src/tty_wrap.h index 5e0517598b0922..16697fedd0774d 100644 --- a/src/tty_wrap.h +++ b/src/tty_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_TTY_WRAP_H_ #define SRC_TTY_WRAP_H_ diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index d14eefd64d600a..795ac93d2c34d6 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "udp_wrap.h" #include "env.h" #include "env-inl.h" diff --git a/src/udp_wrap.h b/src/udp_wrap.h index ad5f92c0f52bcb..2e2b0955c10ad9 100644 --- a/src/udp_wrap.h +++ b/src/udp_wrap.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_UDP_WRAP_H_ #define SRC_UDP_WRAP_H_ diff --git a/src/util-inl.h b/src/util-inl.h index 82ab6632773854..02620bd82a5cd3 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MITSE + #ifndef SRC_UTIL_INL_H_ #define SRC_UTIL_INL_H_ diff --git a/src/util.cc b/src/util.cc index 9fb5c3fd2855d3..50626d40b3eeac 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "util.h" #include "string_bytes.h" #include "node_buffer.h" diff --git a/src/util.h b/src/util.h index b32f2b8a71ca0f..e4dfa1c68a392d 100644 --- a/src/util.h +++ b/src/util.h @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #ifndef SRC_UTIL_H_ #define SRC_UTIL_H_ diff --git a/src/uv.cc b/src/uv.cc index c0e742bf159d98..b7dd6f15fe26df 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -1,3 +1,6 @@ +// Copyright Node.js contributors. All rights reserved. +// SPDX-License-Identifier: MIT + #include "uv.h" #include "node.h" #include "env.h" diff --git a/src/v8abbr.h b/src/v8abbr.h index 5c5e7e24493a0e..83abffbab18ee3 100644 --- a/src/v8abbr.h +++ b/src/v8abbr.h @@ -1,4 +1,6 @@ -/** Copyright Joyent, Inc. and other Node contributors. +/** +* SPDX-License-Identifier: MIT +* Copyright Joyent, Inc. and other Node contributors. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the diff --git a/test/CPPLINT.cfg b/test/CPPLINT.cfg new file mode 100644 index 00000000000000..88c6f99113d516 --- /dev/null +++ b/test/CPPLINT.cfg @@ -0,0 +1 @@ +filter=-legal/copyright diff --git a/tools/CPPLINT.cfg b/tools/CPPLINT.cfg new file mode 100644 index 00000000000000..88c6f99113d516 --- /dev/null +++ b/tools/CPPLINT.cfg @@ -0,0 +1 @@ +filter=-legal/copyright diff --git a/tools/cpplint.py b/tools/cpplint.py index b5a05f0af39ba7..358671452d0963 100644 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -264,8 +264,7 @@ _DEFAULT_FILTERS = [ '-build/include', '-build/include_alpha', - '-build/include_order', - '-legal/copyright', + '-build/include_order' ] # The default list of categories suppressed for C (not C++) files. @@ -1692,12 +1691,20 @@ def CheckForCopyright(filename, lines, error): # We'll say it should occur by line 10. Don't forget there's a # dummy line at the front. for line in xrange(1, min(len(lines), 11)): - if re.search(r'Copyright', lines[line], re.I): break + if (re.search(r'Copyright node.js contributors. All rights reserved.', + lines[line], re.I) or + re.search(r'Copyright', lines[line], re.I)): break else: # means no copyright line was found error(filename, 0, 'legal/copyright', 5, 'No copyright message found. ' - 'You should have a line: "Copyright [year] "') - + 'You should have a line: "Copyright Node.js contributors. ' + 'All rights reserved."') + for line in xrange(1, min(len(lines), 11)): + if re.search(r'SPDX-License-Identifier: MIT', lines[line], re.I): break + else: + error(filename, 0, 'legal/copyright', 5, + 'No SPDX license identifier found. ' + 'You should have a line: "SPDX-License-Identifier: MIT"') def GetIndentLevel(line): """Return the number of leading spaces in line. diff --git a/tools/eslint-rules/no-copyright.js b/tools/eslint-rules/no-copyright.js new file mode 100644 index 00000000000000..a2246326015bee --- /dev/null +++ b/tools/eslint-rules/no-copyright.js @@ -0,0 +1,46 @@ +/** + * @fileoverview Verify copyright header + * @author James M Snell + */ +'use strict'; + +const copyright = /Copyright Node\.js contributors\. All rights reserved\./; +const spdx = /SPDX-License-Identifier: MIT/; + +module.exports = function(context) { + + const state = { + copyright: 0, + spdx: 0 + }; + + function process(node) { + if (copyright.test(node.value)) + state.copyright++; + if (spdx.test(node.value)) + state.spdx++; + } + + return { + 'BlockComment': process, + 'LineComment': process, + 'Program:exit': function(node) { + if (state.copyright === 0) { + context.report(node, + 'The Node.js Copyright comment is required'); + } + if (state.copyright > 1) { + context.report(node, + 'There should be only one Node.js Copyright comment'); + } + if (state.spdx === 0) { + context.report(node, + 'The Node.js SPDX License comment is required'); + } + if (state.spdx > 1) { + context.report(node, + 'There should be only one Node.js SPDX License comment'); + } + } + }; +};