From d8faa2a0e141ee5252d4ad72b862a756df97c036 Mon Sep 17 00:00:00 2001 From: Beth Griggs Date: Tue, 14 Jul 2020 19:27:52 +0100 Subject: [PATCH 1/2] doc: sync deprecation numbers with v14.x Syncs master and v14.x for DEP0143 - `Transform._transformState`. Bumps `module.parent` from DEP0143 to DEP0144 on master. Adds missing DEP number and metadata for DEP0145: `socket.bufferSize`. --- doc/api/deprecations.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 62ea8787e2c8c7..9c1b58d39ab7fd 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2719,13 +2719,25 @@ native modules. It was incomplete so far and instead it's better to rely upon `require('module').builtinModules`. -### DEP0143: `module.parent` +### DEP0143: `Transform._transformState` +Type: Runtime +`Transform._transformState` will be removed in future versions where it is +no longer required due to simplification of the implementation. + + +### DEP0144: `module.parent` + Type: Documentation-only (supports [`--pending-deprecation`][]) @@ -2751,12 +2763,12 @@ const moduleParents = Object.values(require.cache) .filter((m) => m.children.includes(module)); ``` - -### DEP0XXX: `socket.bufferSize` + +### DEP0145: `socket.bufferSize` From eeda6095ab101f593ebcc80ab1ccdf466990eb44 Mon Sep 17 00:00:00 2001 From: Beth Griggs Date: Tue, 14 Jul 2020 20:20:08 +0100 Subject: [PATCH 2/2] module: update expected module.parent DEP number --- lib/internal/modules/cjs/loader.js | 2 +- test/parallel/test-module-parent-deprecation.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index 5ffb48406323ae..c3c0758cf8ab47 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -248,7 +248,7 @@ ObjectDefineProperty(Module.prototype, 'parent', { getModuleParent, 'module.parent is deprecated due to accuracy issues. Please use ' + 'require.main to find program entry point instead.', - 'DEP0143' + 'DEP0144' ) : getModuleParent }); diff --git a/test/parallel/test-module-parent-deprecation.js b/test/parallel/test-module-parent-deprecation.js index 439e86bc96810a..e2533f87d417d0 100644 --- a/test/parallel/test-module-parent-deprecation.js +++ b/test/parallel/test-module-parent-deprecation.js @@ -8,7 +8,7 @@ common.expectWarning( 'DeprecationWarning', 'module.parent is deprecated due to accuracy issues. Please use ' + 'require.main to find program entry point instead.', - 'DEP0143' + 'DEP0144' ); assert.strictEqual(module.parent, null);