Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 64287e4

Browse filesBrowse files
committed
module: runtime deprecate trailing slash patterns
PR-URL: #40117 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3101c09 commit 64287e4
Copy full SHA for 64287e4

File tree

Expand file treeCollapse file tree

4 files changed

+4
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+4
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2820,13 +2820,16 @@ and `'mgf1HashAlgorithm'`.
28202820
### DEP0155: Trailing slashes in pattern specifier resolutions
28212821
<!-- YAML
28222822
changes:
2823+
- version: REPLACEME
2824+
pr-url: https://github.com/nodejs/node/pull/40117
2825+
description: Runtime deprecation.
28232826
- version: REPLACEME
28242827
pr-url: https://github.com/nodejs/node/pull/40039
28252828
description: Documentation-only deprecation
28262829
with `--pending-deprecation` support.
28272830
-->
28282831

2829-
Type: Documentation-only (supports [`--pending-deprecation`][])
2832+
Type: Runtime
28302833

28312834
The remapping of specifiers ending in `"/"` like `import 'pkg/x/'` is deprecated
28322835
for package `"exports"` and `"imports"` pattern resolutions.
Collapse file

‎lib/internal/modules/esm/resolve.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/resolve.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const { sep, relative, resolve } = require('path');
3939
const preserveSymlinks = getOptionValue('--preserve-symlinks');
4040
const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main');
4141
const typeFlag = getOptionValue('--input-type');
42-
const pendingDeprecation = getOptionValue('--pending-deprecation');
4342
const { URL, pathToFileURL, fileURLToPath } = require('internal/url');
4443
const {
4544
ERR_INPUT_TYPE_NOT_ALLOWED,
@@ -107,7 +106,6 @@ function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) {
107106
}
108107

109108
function emitTrailingSlashPatternDeprecation(match, pjsonUrl, isExports, base) {
110-
if (!pendingDeprecation) return;
111109
const pjsonPath = fileURLToPath(pjsonUrl);
112110
if (emittedPackageWarnings.has(pjsonPath + '|' + match))
113111
return;
Collapse file

‎test/es-module/test-esm-exports-deprecations.mjs‎

Copy file name to clipboardExpand all lines: test/es-module/test-esm-exports-deprecations.mjs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Flags: --pending-deprecation
21
import { mustCall } from '../common/index.mjs';
32
import assert from 'assert';
43

Collapse file

‎test/es-module/test-esm-local-deprecations.mjs‎

Copy file name to clipboardExpand all lines: test/es-module/test-esm-local-deprecations.mjs
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Flags: --pending-deprecation
2-
31
import '../common/index.mjs';
42
import assert from 'assert';
53
import fixtures from '../common/fixtures.js';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.