Commit 0497d26
committed
Added
- Updated macro APIs: `Sources/JavaScriptKit/Macros.swift`
- Plumbed `jsName` through the imported skeleton + Swift parser: `Plugins/BridgeJS/Sources/BridgeJSSkeleton/BridgeJSSkeleton.swift`, `Plugins/BridgeJS/Sources/BridgeJSCore/SwiftToSkeleton.swift`
- Updated JS glue + generated `.d.ts` to use the JS names (dot access when possible, bracket access when needed): `Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift`
- Updated TS→Swift generator to emit `@JSClass(jsName: ...)` / `@JSFunction(jsName: ...)` when it has to sanitize names: `Plugins/BridgeJS/Sources/TS2Swift/JavaScript/src/processor.js`
- Added coverage for a renamed class + quoted method name: `Plugins/BridgeJS/Tests/BridgeJSToolTests/Inputs/InvalidPropertyNames.d.ts` (snapshots refreshed; `swift test --package-path ./Plugins/BridgeJS` passes)jsName support to @JSFunction and @JSClass, end-to-end.1 parent 7906050 commit 0497d26
File tree
10 files changed
+260
-40
lines changed- Plugins/BridgeJS
- Sources
- BridgeJSCore
- BridgeJSLink
- BridgeJSSkeleton
- TS2Swift/JavaScript/src
- Tests/BridgeJSToolTests
- Inputs
- __Snapshots__
- BridgeJSLinkTests
- ImportTSTests
- Sources/JavaScriptKit
10 files changed
+260
-40
lines changedLines changed: 34 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1743 | 1743 | | |
1744 | 1744 | | |
1745 | 1745 | | |
| 1746 | + | |
1746 | 1747 | | |
1747 | 1748 | | |
1748 | 1749 | | |
| |||
1758 | 1759 | | |
1759 | 1760 | | |
1760 | 1761 | | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
1761 | 1768 | | |
1762 | 1769 | | |
1763 | 1770 | | |
| |||
1782 | 1789 | | |
1783 | 1790 | | |
1784 | 1791 | | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
1785 | 1798 | | |
1786 | 1799 | | |
1787 | 1800 | | |
| |||
1929 | 1942 | | |
1930 | 1943 | | |
1931 | 1944 | | |
1932 | | - | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
1933 | 1951 | | |
1934 | 1952 | | |
1935 | 1953 | | |
1936 | 1954 | | |
1937 | 1955 | | |
1938 | 1956 | | |
1939 | 1957 | | |
| 1958 | + | |
1940 | 1959 | | |
1941 | 1960 | | |
1942 | 1961 | | |
| |||
1951 | 1970 | | |
1952 | 1971 | | |
1953 | 1972 | | |
1954 | | - | |
| 1973 | + | |
| 1974 | + | |
1955 | 1975 | | |
1956 | 1976 | | |
1957 | 1977 | | |
| |||
1964 | 1984 | | |
1965 | 1985 | | |
1966 | 1986 | | |
1967 | | - | |
| 1987 | + | |
| 1988 | + | |
1968 | 1989 | | |
1969 | 1990 | | |
1970 | 1991 | | |
| |||
2002 | 2023 | | |
2003 | 2024 | | |
2004 | 2025 | | |
2005 | | - | |
2006 | | - | |
| 2026 | + | |
| 2027 | + | |
2007 | 2028 | | |
2008 | 2029 | | |
2009 | 2030 | | |
| |||
2027 | 2048 | | |
2028 | 2049 | | |
2029 | 2050 | | |
2030 | | - | |
| 2051 | + | |
2031 | 2052 | | |
2032 | | - | |
| 2053 | + | |
2033 | 2054 | | |
2034 | 2055 | | |
2035 | 2056 | | |
2036 | | - | |
| 2057 | + | |
2037 | 2058 | | |
2038 | 2059 | | |
2039 | 2060 | | |
| |||
2130 | 2151 | | |
2131 | 2152 | | |
2132 | 2153 | | |
2133 | | - | |
2134 | | - | |
| 2154 | + | |
| 2155 | + | |
2135 | 2156 | | |
2136 | 2157 | | |
2137 | 2158 | | |
| |||
2175 | 2196 | | |
2176 | 2197 | | |
2177 | 2198 | | |
| 2199 | + | |
2178 | 2200 | | |
2179 | 2201 | | |
2180 | 2202 | | |
| |||
2185 | 2207 | | |
2186 | 2208 | | |
2187 | 2209 | | |
| 2210 | + | |
2188 | 2211 | | |
2189 | 2212 | | |
2190 | 2213 | | |
| |||
2204 | 2227 | | |
2205 | 2228 | | |
2206 | 2229 | | |
| 2230 | + | |
2207 | 2231 | | |
2208 | 2232 | | |
2209 | 2233 | | |
| |||
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
| 1197 | + | |
1197 | 1198 | | |
1198 | | - | |
| 1199 | + | |
1199 | 1200 | | |
1200 | 1201 | | |
1201 | 1202 | | |
| |||
2127 | 2128 | | |
2128 | 2129 | | |
2129 | 2130 | | |
2130 | | - | |
| 2131 | + | |
| 2132 | + | |
2131 | 2133 | | |
2132 | 2134 | | |
2133 | 2135 | | |
| |||
2153 | 2155 | | |
2154 | 2156 | | |
2155 | 2157 | | |
2156 | | - | |
2157 | | - | |
2158 | | - | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
2159 | 2162 | | |
2160 | 2163 | | |
2161 | 2164 | | |
2162 | 2165 | | |
2163 | 2166 | | |
| 2167 | + | |
| 2168 | + | |
2164 | 2169 | | |
2165 | | - | |
| 2170 | + | |
2166 | 2171 | | |
2167 | 2172 | | |
2168 | 2173 | | |
| |||
2957 | 2962 | | |
2958 | 2963 | | |
2959 | 2964 | | |
2960 | | - | |
| 2965 | + | |
| 2966 | + | |
2961 | 2967 | | |
2962 | 2968 | | |
2963 | 2969 | | |
| |||
2966 | 2972 | | |
2967 | 2973 | | |
2968 | 2974 | | |
2969 | | - | |
| 2975 | + | |
2970 | 2976 | | |
2971 | 2977 | | |
2972 | 2978 | | |
| |||
3049 | 3055 | | |
3050 | 3056 | | |
3051 | 3057 | | |
3052 | | - | |
| 3058 | + | |
3053 | 3059 | | |
3054 | 3060 | | |
3055 | 3061 | | |
| |||
3111 | 3117 | | |
3112 | 3118 | | |
3113 | 3119 | | |
3114 | | - | |
| 3120 | + | |
3115 | 3121 | | |
3116 | 3122 | | |
3117 | 3123 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
| 593 | + | |
| 594 | + | |
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
597 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
598 | 606 | | |
| 607 | + | |
599 | 608 | | |
600 | 609 | | |
601 | 610 | | |
| |||
704 | 713 | | |
705 | 714 | | |
706 | 715 | | |
| 716 | + | |
| 717 | + | |
707 | 718 | | |
708 | 719 | | |
709 | 720 | | |
| |||
712 | 723 | | |
713 | 724 | | |
714 | 725 | | |
| 726 | + | |
715 | 727 | | |
716 | 728 | | |
717 | 729 | | |
718 | 730 | | |
719 | 731 | | |
720 | 732 | | |
721 | 733 | | |
| 734 | + | |
722 | 735 | | |
723 | 736 | | |
724 | 737 | | |
| |||
0 commit comments