| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3ba6813 commit 14701e5
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2451,12 +2451,15 @@ instead. | |||
| 2451 | 2451 | ### DEP0130: Module.createRequireFromPath() | |
| 2452 | 2452 | <!-- YAML | |
| 2453 | 2453 | changes: | |
| 2454 | + - version: REPLACEME | ||
| 2455 | + pr-url: https://github.com/nodejs/node/pull/27951 | ||
| 2456 | + description: Runtime deprecation. | ||
| 2454 | 2457 | - version: v12.2.0 | |
| 2455 | 2458 | pr-url: https://github.com/nodejs/node/pull/27405 | |
| 2456 | 2459 | description: Documentation-only. | |
| 2457 | 2460 | --> | |
| 2458 | 2461 | ||
| 2459 | - Type: Documentation-only | ||
| 2462 | + Type: Runtime | ||
| 2460 | 2463 | ||
| 2461 | 2464 | Module.createRequireFromPath() is deprecated. Please use [`module.createRequire()`][] instead. | |
| 2462 | 2465 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -860,7 +860,12 @@ function createRequireFromPath(filename) { | |||
| 860 | 860 | return makeRequireFunction(m); | |
| 861 | 861 | } | |
| 862 | 862 | ||
| 863 | - Module.createRequireFromPath = createRequireFromPath; | ||
| 863 | + Module.createRequireFromPath = deprecate( | ||
| 864 | + createRequireFromPath, | ||
| 865 | + 'Module.createRequireFromPath() is deprecated. ' + | ||
| 866 | + 'Use Module.createRequire() instead.', | ||
| 867 | + 'DEP0130' | ||
| 868 | + ); | ||
| 864 | 869 | ||
| 865 | 870 | const createRequireError = 'must be a file URL object, file URL string, or ' + | |
| 866 | 871 | 'absolute path string'; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,3 +5,4 @@ Error: test | |||
| 5 | 5 | at async three (*fixtures*async-error.js:20:3) | |
| 6 | 6 | at async four (*fixtures*async-error.js:24:3) | |
| 7 | 7 | at async main (*message*async_error_sync_esm.mjs:7:5) | |
| 8 | + (node:*) [DEP0130] DeprecationWarning: Module.createRequireFromPath() is deprecated. Use Module.createRequire() instead. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments