()
| 1907 | } |
| 1908 | |
| 1909 | getRenameInfo() { |
| 1910 | if (this._usedName !== null && this._usedName !== this.name) { |
| 1911 | return `renamed to ${JSON.stringify(this._usedName).slice(1, -1)}`; |
| 1912 | } |
| 1913 | switch (this.canMangleProvide) { |
| 1914 | case undefined: |
| 1915 | switch (this.canMangleUse) { |
| 1916 | case undefined: |
| 1917 | return "missing provision and use info prevents renaming"; |
| 1918 | case false: |
| 1919 | return "usage prevents renaming (no provision info)"; |
| 1920 | case true: |
| 1921 | return "missing provision info prevents renaming"; |
| 1922 | } |
| 1923 | break; |
| 1924 | case true: |
| 1925 | switch (this.canMangleUse) { |
| 1926 | case undefined: |
| 1927 | return "missing usage info prevents renaming"; |
| 1928 | case false: |
| 1929 | return "usage prevents renaming"; |
| 1930 | case true: |
| 1931 | return "could be renamed"; |
| 1932 | } |
| 1933 | break; |
| 1934 | case false: |
| 1935 | switch (this.canMangleUse) { |
| 1936 | case undefined: |
| 1937 | return "provision prevents renaming (no use info)"; |
| 1938 | case false: |
| 1939 | return "usage and provision prevents renaming"; |
| 1940 | case true: |
| 1941 | return "provision prevents renaming"; |
| 1942 | } |
| 1943 | break; |
| 1944 | } |
| 1945 | throw new Error( |
| 1946 | `Unexpected flags for getRenameInfo ${this.canMangleProvide} ${this.canMangleUse}` |
| 1947 | ); |
| 1948 | } |
| 1949 | } |
| 1950 | |
| 1951 | module.exports = ExportsInfo; |
no test coverage detected