File tree Expand file tree Collapse file tree 4 files changed +33
-3
lines changed
Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -3849,6 +3849,22 @@ Type: Documentation-only
38493849` process.features.tls_alpn ` , ` process.features.tls_ocsp ` , and ` process.features.tls_sni ` are
38503850deprecated, as their values are guaranteed to be identical to that of ` process.features.tls ` .
38513851
3852+ ### DEP0190: ` repl.builtinModules `
3853+
3854+ <!-- YAML
3855+ changes:
3856+ - version: REPLACEME
3857+ pr-url: https://github.com/nodejs/node/pull/57508
3858+ description: Documentation-only (supports [`--pending-deprecation`][]).
3859+ -->
3860+
3861+ Type: Documentation-only
3862+
3863+ The ` node:repl ` module exports a ` builtinModules ` property that contains an array
3864+ of built-in modules. This was incomplete and matched the already deprecated
3865+ ` repl._builtinLibs ` (DEP0142) instead it's better to rely
3866+ upon ` require('node:module').builtinModules ` .
3867+
38523868[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
38533869[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
38543870[ RFC 8247 Section 2.4 ] : https://www.rfc-editor.org/rfc/rfc8247#section-2.4
Original file line number Diff line number Diff line change @@ -646,8 +646,11 @@ with REPL instances programmatically.
646646
647647<!-- YAML
648648added: v14.5.0
649+ deprecated: REPLACEME
649650-->
650651
652+ > Stability: 0 - Deprecated. Use ` module.builtinModules ` instead.
653+
651654* {string\[ ] }
652655
653656A list of the names of all Node.js modules, e.g., ` 'http' ` .
Original file line number Diff line number Diff line change @@ -1862,9 +1862,17 @@ module.exports = {
18621862
18631863ObjectDefineProperty ( module . exports , 'builtinModules' , {
18641864 __proto__ : null ,
1865- get : ( ) => _builtinLibs ,
1866- set : ( val ) => _builtinLibs = val ,
1867- enumerable : true ,
1865+ get : pendingDeprecation ? deprecate (
1866+ ( ) => require ( '' ) ,
1867+ 'repl.builtinModules is deprecated. Check module.builtinModules instead' ,
1868+ 'DEP0190' ,
1869+ ) : ( ) => _builtinLibs ,
1870+ set : pendingDeprecation ? deprecate (
1871+ ( val ) => _builtinLibs = val ,
1872+ 'repl.builtinModules is deprecated. Check module.builtinModules instead' ,
1873+ 'DEP0190' ,
1874+ ) : ( val ) => _builtinLibs = val ,
1875+ enumerable : false ,
18681876 configurable : true ,
18691877} ) ;
18701878
Original file line number Diff line number Diff line change @@ -29,12 +29,15 @@ const repl = require('repl');
2929const cp = require ( 'child_process' ) ;
3030
3131assert . strictEqual ( repl . repl , undefined ) ;
32+
3233repl . _builtinLibs ; // eslint-disable-line no-unused-expressions
34+ repl . builtinModules ; // eslint-disable-line no-unused-expressions
3335
3436common . expectWarning ( {
3537 DeprecationWarning : {
3638 DEP0142 :
3739 'repl._builtinLibs is deprecated. Check module.builtinModules instead' ,
40+ DEP0190 : 'repl.builtinModules is deprecated. Check module.builtinModules instead' ,
3841 DEP0141 : 'repl.inputStream and repl.outputStream are deprecated. ' +
3942 'Use repl.input and repl.output instead' ,
4043 }
You can’t perform that action at this time.
0 commit comments