@@ -15,8 +15,38 @@ const { browsers } = bcd;
1515
1616type Notes = string | [ string , string , ...string [ ] ] | null ;
1717
18+ const OS_NOTES = [
19+ 'Available on macOS and Windows only.' ,
20+ 'Available only on macOS.' ,
21+ 'ChromeOS only' ,
22+ 'ChromeOS and Windows' ,
23+ 'Fully supported on Windows and Linux, no support on ChromeOS.' ,
24+ 'Linux support is not enabled by default.' ,
25+ 'Not supported on macOS.' ,
26+ 'Not supported on Windows.' ,
27+ 'Only on macOS and Windows.' ,
28+ 'Only on Windows.' ,
29+ 'Only supported on ChromeOS' ,
30+ 'Only supported on macOS.' ,
31+ 'Only supported on Windows.' ,
32+ 'Only works on macOS.' ,
33+ 'Supported on ChromeOS, macOS, and Windows only.' ,
34+ 'Supported on ChromeOS and macOS only.' ,
35+ 'Supported on macOS only.' ,
36+ 'Supported on macOS Catalina 10.15.1+, Windows, and ChromeOS. Not yet supported on Linux.' ,
37+ 'Supported on Windows only, in all contexts except for service workers.' ,
38+ 'Supported only on macOS 10.12 (Sierra) and later.' ,
39+ 'This cursor is only supported on macOS and Linux.' ,
40+ ] . map ( ( s ) => s . toLowerCase ( ) ) ;
41+
1842/**
43+ * Check if a note indicates OS-specific limitations.
44+ * @param notes A single notes string from a support statement
45+ * @returns True if the notes indicate OS-specific limitations
1946 */
47+ export const isOSLimitation = ( notes : string ) : boolean => {
48+ return OS_NOTES . includes ( notes . toLowerCase ( ) ) ;
49+ } ;
2050
2151const matchingSafariVersions = new Map ( [
2252 [ '1' , '1' ] ,
@@ -215,6 +245,30 @@ export const bumpSupport = (
215245
216246 const newData : SimpleSupportStatement = copyStatement ( sourceData ) ;
217247
248+ if (
249+ browsers [ sourceBrowser ] . type === 'desktop' &&
250+ browsers [ destination ] . type === 'mobile' &&
251+ sourceData . partial_implementation
252+ ) {
253+ const notes = Array . isArray ( sourceData . notes )
254+ ? sourceData . notes
255+ : sourceData . notes
256+ ? [ sourceData . notes ]
257+ : [ ] ;
258+ const [ firstNote , secondNote , ...otherNotes ] = notes . filter (
259+ ( notes ) => ! isOSLimitation ( notes ) ,
260+ ) ;
261+ if ( ! firstNote ) {
262+ // Ignore OS limitation.
263+ delete newData . partial_implementation ;
264+ delete newData . notes ;
265+ } else if ( ! secondNote ) {
266+ newData . notes = firstNote ;
267+ } else {
268+ newData . notes = [ firstNote , secondNote , ...otherNotes ] ;
269+ }
270+ }
271+
218272 if ( ! browsers [ destination ] . accepts_flags && newData . flags ) {
219273 // Remove flag data if the target browser doesn't accept flags
220274 return { version_added : false } ;
@@ -254,7 +308,8 @@ export const bumpSupport = (
254308 return { version_added : false } ;
255309 }
256310
257- if ( sourceData . notes ) {
311+ // Only process notes if they weren't already removed (e.g., for OS-specific limitations)
312+ if ( sourceData . notes && newData . notes !== undefined ) {
258313 const sourceBrowserName =
259314 sourceBrowser === 'chrome'
260315 ? '(Google )?Chrome'
0 commit comments