File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -88,29 +88,16 @@ async function fetchBugMetadata(bugIds: Set<string>): Promise<BugMetaMap> {
88
88
* @returns The versions for each release channel.
89
89
*/
90
90
async function fetchVersionsPerChannel ( ) : Promise < FirefoxVersions > {
91
- let [ nightly , beta , release ] = await Promise . all ( [
92
- fetchVersionNumber ( "nightly" ) ,
93
- fetchVersionNumber ( "beta" ) ,
94
- fetchVersionNumber ( "release" ) ,
95
- ] ) ;
96
- return {
97
- nightly,
98
- beta,
99
- release,
100
- } ;
101
- }
102
-
103
- /**
104
- * Fetch the version number for a given release channel.
105
- * @param releaseChannel The release channel to fetch the version number for.
106
- * @returns The version number for the given release channel.
107
- */
108
- async function fetchVersionNumber ( releaseChannel : string ) : Promise < string > {
109
- let url = new URL ( "https://whattrainisitnow.com/api/release/schedule/" ) ;
110
- url . searchParams . set ( "version" , releaseChannel ) ;
91
+ const url = "https://product-details.mozilla.org/1.0/firefox_versions.json" ;
111
92
const response = await fetch ( url ) ;
112
93
const json = await response . json ( ) ;
113
- return json . version ;
94
+
95
+ return {
96
+ nightly : json . FIREFOX_NIGHTLY ,
97
+ beta : json . LATEST_FIREFOX_RELEASED_DEVEL_VERSION ,
98
+ release : json . LATEST_FIREFOX_VERSION ,
99
+ esr : json . FIREFOX_ESR ,
100
+ } ;
114
101
}
115
102
116
103
@customElement ( "app-root" )
Original file line number Diff line number Diff line change @@ -24,11 +24,12 @@ export interface ExceptionListEntry extends URLClassifierExceptionListEntry {
24
24
}
25
25
26
26
// Firefox release channels for version filtering.
27
- export type FirefoxChannel = "nightly" | "beta" | "release" ;
27
+ export type FirefoxChannel = "nightly" | "beta" | "release" | "esr" ;
28
28
29
29
// Firefox versions for each release channel.
30
30
export interface FirefoxVersions {
31
31
nightly : string ;
32
32
beta : string ;
33
33
release : string ;
34
+ esr : string ;
34
35
}
You can’t perform that action at this time.
0 commit comments