| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3589,6 +3589,9 @@ The [`util.toUSVString()`][] API is deprecated. Please use | |||
| 3589 | 3589 | ||
| 3590 | 3590 | <!-- YAML | |
| 3591 | 3591 | changes: | |
| 3592 | + - version: REPLACEME | ||
| 3593 | + pr-url: https://github.com/nodejs/node/pull/55862 | ||
| 3594 | + description: End-of-Life. | ||
| 3592 | 3595 | - version: REPLACEME | |
| 3593 | 3596 | pr-url: https://github.com/nodejs/node/pull/49686 | |
| 3594 | 3597 | description: Runtime deprecation. | |
@@ -3597,10 +3600,10 @@ changes: | |||
| 3597 | 3600 | description: Documentation-only deprecation. | |
| 3598 | 3601 | --> | |
| 3599 | 3602 | ||
| 3600 | - Type: Runtime | ||
| 3603 | + Type: End-of-Life | ||
| 3601 | 3604 | ||
| 3602 | - `F_OK`, `R_OK`, `W_OK` and `X_OK` getters exposed directly on `node:fs` are | ||
| 3603 | - deprecated. Get them from `fs.constants` or `fs.promises.constants` instead. | ||
| 3605 | + `F_OK`, `R_OK`, `W_OK` and `X_OK` getters exposed directly on `node:fs` were | ||
| 3606 | + removed. Get them from `fs.constants` or `fs.promises.constants` instead. | ||
| 3604 | 3607 | ||
| 3605 | 3608 | ### DEP0177: `util.types.isWebAssemblyCompiledModule` | |
| 3606 | 3609 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1927,6 +1927,10 @@ concurrent modifications on the same file or data corruption may occur. | |||
| 1927 | 1927 | <!-- YAML | |
| 1928 | 1928 | added: v0.11.15 | |
| 1929 | 1929 | changes: | |
| 1930 | + - version: REPLACEME | ||
| 1931 | + pr-url: https://github.com/nodejs/node/pull/55862 | ||
| 1932 | + description: The constants `fs.F_OK`, `fs.R_OK`, `fs.W_OK` and `fs.X_OK` | ||
| 1933 | + which were present directly on `fs` are removed. | ||
| 1930 | 1934 | - version: v20.8.0 | |
| 1931 | 1935 | pr-url: https://github.com/nodejs/node/pull/49683 | |
| 1932 | 1936 | description: The constants `fs.F_OK`, `fs.R_OK`, `fs.W_OK` and `fs.X_OK` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,9 +52,6 @@ const { | |||
| 52 | 52 | S_IFREG, | |
| 53 | 53 | S_IFSOCK, | |
| 54 | 54 | F_OK, | |
| 55 | - R_OK, | ||
| 56 | - W_OK, | ||
| 57 | - X_OK, | ||
| 58 | 55 | O_WRONLY, | |
| 59 | 56 | O_SYMLINK, | |
| 60 | 57 | } = constants; | |
@@ -87,7 +84,6 @@ const { | |||
| 87 | 84 | const { toPathIfFileURL } = require('internal/url'); | |
| 88 | 85 | const { | |
| 89 | 86 | customPromisifyArgs: kCustomPromisifyArgsSymbol, | |
| 90 | - deprecate, | ||
| 91 | 87 | emitExperimentalWarning, | |
| 92 | 88 | getLazy, | |
| 93 | 89 | kEmptyObject, | |
@@ -3358,50 +3354,6 @@ defineLazyProperties( | |||
| 3358 | 3354 | ); | |
| 3359 | 3355 | ||
| 3360 | 3356 | ObjectDefineProperties(fs, { | |
| 3361 | - F_OK: { | ||
| 3362 | - __proto__: null, | ||
| 3363 | - enumerable: false, | ||
| 3364 | - get: deprecate( | ||
| 3365 | - function get() { | ||
| 3366 | - return F_OK || 0; | ||
| 3367 | - }, | ||
| 3368 | - 'fs.F_OK is deprecated, use fs.constants.F_OK instead', | ||
| 3369 | - 'DEP0176', | ||
| 3370 | - ), | ||
| 3371 | - }, | ||
| 3372 | - R_OK: { | ||
| 3373 | - __proto__: null, | ||
| 3374 | - enumerable: false, | ||
| 3375 | - get: deprecate( | ||
| 3376 | - function get() { | ||
| 3377 | - return R_OK || 0; | ||
| 3378 | - }, | ||
| 3379 | - 'fs.R_OK is deprecated, use fs.constants.R_OK instead', | ||
| 3380 | - 'DEP0176', | ||
| 3381 | - ), | ||
| 3382 | - }, | ||
| 3383 | - W_OK: { | ||
| 3384 | - __proto__: null, | ||
| 3385 | - enumerable: false, | ||
| 3386 | - get: deprecate( | ||
| 3387 | - function get() { | ||
| 3388 | - return W_OK || 0; | ||
| 3389 | - }, | ||
| 3390 | - 'fs.W_OK is deprecated, use fs.constants.W_OK instead', | ||
| 3391 | - 'DEP0176', | ||
| 3392 | - ), | ||
| 3393 | - }, | ||
| 3394 | - X_OK: { | ||
| 3395 | - __proto__: null, | ||
| 3396 | - enumerable: false, | ||
| 3397 | - get: deprecate( | ||
| 3398 | - function get() { | ||
| 3399 | - return X_OK || 0; | ||
| 3400 | - }, | ||
| 3401 | - 'fs.X_OK is deprecated, use fs.constants.X_OK instead', | ||
| 3402 | - 'DEP0176', | ||
| 3403 | - ), | ||
| 3404 | - }, | ||
| 3405 | 3357 | constants: { | |
| 3406 | 3358 | __proto__: null, | |
| 3407 | 3359 | configurable: false, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,27 +1,8 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - const { expectWarning } = require('../common'); | ||
| 2 | + require('../common'); | ||
| 3 | 3 | const fs = require('fs'); | |
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | // Check if the two constants accepted by chmod() on Windows are defined. | |
| 7 | 7 | assert.notStrictEqual(fs.constants.S_IRUSR, undefined); | |
| 8 | 8 | assert.notStrictEqual(fs.constants.S_IWUSR, undefined); | |
| 9 | - | ||
| 10 | - // Check for runtime deprecation warning, there should be no setter | ||
| 11 | - const { F_OK, R_OK, W_OK, X_OK } = fs.constants; | ||
| 12 | - | ||
| 13 | - assert.throws(() => { fs.F_OK = 'overwritten'; }, { name: 'TypeError' }); | ||
| 14 | - assert.throws(() => { fs.R_OK = 'overwritten'; }, { name: 'TypeError' }); | ||
| 15 | - assert.throws(() => { fs.W_OK = 'overwritten'; }, { name: 'TypeError' }); | ||
| 16 | - assert.throws(() => { fs.X_OK = 'overwritten'; }, { name: 'TypeError' }); | ||
| 17 | - | ||
| 18 | - expectWarning( | ||
| 19 | - 'DeprecationWarning', | ||
| 20 | - 'fs.F_OK is deprecated, use fs.constants.F_OK instead', | ||
| 21 | - 'DEP0176' | ||
| 22 | - ); | ||
| 23 | - | ||
| 24 | - assert.strictEqual(fs.F_OK, F_OK); | ||
| 25 | - assert.strictEqual(fs.R_OK, R_OK); | ||
| 26 | - assert.strictEqual(fs.W_OK, W_OK); | ||
| 27 | - assert.strictEqual(fs.X_OK, X_OK); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments