| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5de37a1 commit ca20f59
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | 3 | const { | |
| 4 | - ArrayPrototypeJoin, | ||
| 5 | 4 | ArrayPrototypePush, | |
| 6 | 5 | FunctionPrototypeCall, | |
| 7 | 6 | Int32Array, | |
@@ -658,45 +657,9 @@ function pluckHooks({ | |||
| 658 | 657 | globalPreload, | |
| 659 | 658 | resolve, | |
| 660 | 659 | load, | |
| 661 | - // obsolete hooks: | ||
| 662 | - dynamicInstantiate, | ||
| 663 | - getFormat, | ||
| 664 | - getGlobalPreloadCode, | ||
| 665 | - getSource, | ||
| 666 | - transformSource, | ||
| 667 | 660 | }) { | |
| 668 | - const obsoleteHooks = []; | ||
| 669 | 661 | const acceptedHooks = { __proto__: null }; | |
| 670 | 662 | ||
| 671 | - if (getGlobalPreloadCode) { | ||
| 672 | - globalPreload ??= getGlobalPreloadCode; | ||
| 673 | - | ||
| 674 | - process.emitWarning( | ||
| 675 | - 'Loader hook "getGlobalPreloadCode" has been renamed to "globalPreload"', | ||
| 676 | - ); | ||
| 677 | - } | ||
| 678 | - if (dynamicInstantiate) { | ||
| 679 | - ArrayPrototypePush(obsoleteHooks, 'dynamicInstantiate'); | ||
| 680 | - } | ||
| 681 | - if (getFormat) { | ||
| 682 | - ArrayPrototypePush(obsoleteHooks, 'getFormat'); | ||
| 683 | - } | ||
| 684 | - if (getSource) { | ||
| 685 | - ArrayPrototypePush(obsoleteHooks, 'getSource'); | ||
| 686 | - } | ||
| 687 | - if (transformSource) { | ||
| 688 | - ArrayPrototypePush(obsoleteHooks, 'transformSource'); | ||
| 689 | - } | ||
| 690 | - | ||
| 691 | - if (obsoleteHooks.length) { | ||
| 692 | - process.emitWarning( | ||
| 693 | - `Obsolete loader hook(s) supplied and will be ignored: ${ | ||
| 694 | - ArrayPrototypeJoin(obsoleteHooks, ', ') | ||
| 695 | - }`, | ||
| 696 | - 'DeprecationWarning', | ||
| 697 | - ); | ||
| 698 | - } | ||
| 699 | - | ||
| 700 | 663 | if (globalPreload) { | |
| 701 | 664 | acceptedHooks.globalPreload = globalPreload; | |
| 702 | 665 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments