File tree Expand file tree Collapse file tree 1 file changed +45
-4
lines changed Expand file tree Collapse file tree 1 file changed +45
-4
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ const {
83
83
const { toPathIfFileURL } = require ( 'internal/url' ) ;
84
84
const {
85
85
customPromisifyArgs : kCustomPromisifyArgsSymbol ,
86
+ deprecate,
86
87
kEmptyObject,
87
88
promisify : {
88
89
custom : kCustomPromisifiedSymbol ,
@@ -3241,10 +3242,50 @@ defineLazyProperties(
3241
3242
) ;
3242
3243
3243
3244
ObjectDefineProperties ( fs , {
3244
- F_OK : { __proto__ : null , enumerable : true , value : F_OK || 0 } ,
3245
- R_OK : { __proto__ : null , enumerable : true , value : R_OK || 0 } ,
3246
- W_OK : { __proto__ : null , enumerable : true , value : W_OK || 0 } ,
3247
- X_OK : { __proto__ : null , enumerable : true , value : X_OK || 0 } ,
3245
+ F_OK : {
3246
+ __proto__ : null ,
3247
+ enumerable : false ,
3248
+ get : deprecate (
3249
+ function get ( ) {
3250
+ return F_OK || 0 ;
3251
+ } ,
3252
+ 'fs.F_OK is deprecated, use fs.constants.F_OK instead' ,
3253
+ 'DEP0175' ,
3254
+ ) ,
3255
+ } ,
3256
+ R_OK : {
3257
+ __proto__ : null ,
3258
+ enumerable : false ,
3259
+ get : deprecate (
3260
+ function get ( ) {
3261
+ return R_OK || 0 ;
3262
+ } ,
3263
+ 'fs.R_OK is deprecated, use fs.constants.R_OK instead' ,
3264
+ 'DEP0175' ,
3265
+ ) ,
3266
+ } ,
3267
+ W_OK : {
3268
+ __proto__ : null ,
3269
+ enumerable : false ,
3270
+ get : deprecate (
3271
+ function get ( ) {
3272
+ return W_OK || 0 ;
3273
+ } ,
3274
+ 'fs.W_OK is deprecated, use fs.constants.W_OK instead' ,
3275
+ 'DEP0175' ,
3276
+ ) ,
3277
+ } ,
3278
+ X_OK : {
3279
+ __proto__ : null ,
3280
+ enumerable : false ,
3281
+ get : deprecate (
3282
+ function get ( ) {
3283
+ return X_OK || 0 ;
3284
+ } ,
3285
+ 'fs.X_OK is deprecated, use fs.constants.X_OK instead' ,
3286
+ 'DEP0175' ,
3287
+ ) ,
3288
+ } ,
3248
3289
constants : {
3249
3290
__proto__ : null ,
3250
3291
configurable : false ,
You can’t perform that action at this time.
0 commit comments