Bug 1962375 - Move generated typescript files to a generated/ sub-directory and add to Generated.txt. r=zombie,frontend-codestyle-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D246621
This commit is contained in:
Mark Banner
2025-04-29 16:21:01 +00:00
parent 489c038ca6
commit 212ad7ecdf
20 changed files with 224 additions and 58 deletions

View File

@@ -1551,6 +1551,124 @@ mobile/android/android-components/components/ui/widgets/src/main/res/
mobile/android/android-components/config/detekt-baseline.xml
mobile/android/android-components/gradle/wrapper/
mobile/android/android-components/samples/glean/src/main/res/raw/initial_experiments.json
mobile/android/android-components/components/browser/domains/lint-baseline.xml
mobile/android/android-components/components/browser/engine-gecko/lint-baseline.xml
mobile/android/android-components/components/browser/engine-system/lint-baseline.xml
mobile/android/android-components/components/browser/errorpages/lint-baseline.xml
mobile/android/android-components/components/browser/icons/lint-baseline.xml
mobile/android/android-components/components/browser/menu/lint-baseline.xml
mobile/android/android-components/components/browser/menu2/lint-baseline.xml
mobile/android/android-components/components/browser/session-storage/lint-baseline.xml
mobile/android/android-components/components/browser/state/lint-baseline.xml
mobile/android/android-components/components/browser/storage-sync/lint-baseline.xml
mobile/android/android-components/components/browser/tabstray/lint-baseline.xml
mobile/android/android-components/components/browser/thumbnails/lint-baseline.xml
mobile/android/android-components/components/browser/toolbar/lint-baseline.xml
mobile/android/android-components/components/compose/awesomebar/lint-baseline.xml
mobile/android/android-components/components/compose/base/lint-baseline.xml
mobile/android/android-components/components/compose/browser-toolbar/lint-baseline.xml
mobile/android/android-components/components/compose/cfr/lint-baseline.xml
mobile/android/android-components/components/compose/engine/lint-baseline.xml
mobile/android/android-components/components/compose/tabstray/lint-baseline.xml
mobile/android/android-components/components/concept/awesomebar/lint-baseline.xml
mobile/android/android-components/components/concept/base/lint-baseline.xml
mobile/android/android-components/components/concept/engine/lint-baseline.xml
mobile/android/android-components/components/concept/fetch/lint-baseline.xml
mobile/android/android-components/components/concept/menu/lint-baseline.xml
mobile/android/android-components/components/concept/push/lint-baseline.xml
mobile/android/android-components/components/concept/storage/lint-baseline.xml
mobile/android/android-components/components/concept/sync/lint-baseline.xml
mobile/android/android-components/components/concept/tabstray/lint-baseline.xml
mobile/android/android-components/components/concept/toolbar/lint-baseline.xml
mobile/android/android-components/components/feature/accounts-push/lint-baseline.xml
mobile/android/android-components/components/feature/accounts/lint-baseline.xml
mobile/android/android-components/components/feature/addons/lint-baseline.xml
mobile/android/android-components/components/feature/app-links/lint-baseline.xml
mobile/android/android-components/components/feature/autofill/lint-baseline.xml
mobile/android/android-components/components/feature/awesomebar/lint-baseline.xml
mobile/android/android-components/components/feature/containers/lint-baseline.xml
mobile/android/android-components/components/feature/contextmenu/lint-baseline.xml
mobile/android/android-components/components/feature/customtabs/lint-baseline.xml
mobile/android/android-components/components/feature/downloads/lint-baseline.xml
mobile/android/android-components/components/feature/findinpage/lint-baseline.xml
mobile/android/android-components/components/feature/fxsuggest/lint-baseline.xml
mobile/android/android-components/components/feature/intent/lint-baseline.xml
mobile/android/android-components/components/feature/logins/lint-baseline.xml
mobile/android/android-components/components/feature/media/lint-baseline.xml
mobile/android/android-components/components/feature/privatemode/lint-baseline.xml
mobile/android/android-components/components/feature/prompts/lint-baseline.xml
mobile/android/android-components/components/feature/push/lint-baseline.xml
mobile/android/android-components/components/feature/pwa/lint-baseline.xml
mobile/android/android-components/components/feature/qr/lint-baseline.xml
mobile/android/android-components/components/feature/readerview/lint-baseline.xml
mobile/android/android-components/components/feature/recentlyclosed/lint-baseline.xml
mobile/android/android-components/components/feature/screendetection/lint-baseline.xml
mobile/android/android-components/components/feature/search/lint-baseline.xml
mobile/android/android-components/components/feature/serviceworker/lint-baseline.xml
mobile/android/android-components/components/feature/session/lint-baseline.xml
mobile/android/android-components/components/feature/share/lint-baseline.xml
mobile/android/android-components/components/feature/sitepermissions/lint-baseline.xml
mobile/android/android-components/components/feature/syncedtabs/lint-baseline.xml
mobile/android/android-components/components/feature/tab-collections/lint-baseline.xml
mobile/android/android-components/components/feature/tabs/lint-baseline.xml
mobile/android/android-components/components/feature/toolbar/lint-baseline.xml
mobile/android/android-components/components/feature/top-sites/lint-baseline.xml
mobile/android/android-components/components/feature/webauthn/lint-baseline.xml
mobile/android/android-components/components/feature/webcompat-reporter/lint-baseline.xml
mobile/android/android-components/components/feature/webcompat/lint-baseline.xml
mobile/android/android-components/components/feature/webnotifications/lint-baseline.xml
mobile/android/android-components/components/lib/auth/lint-baseline.xml
mobile/android/android-components/components/lib/crash-sentry/lint-baseline.xml
mobile/android/android-components/components/lib/crash/lint-baseline.xml
mobile/android/android-components/components/lib/dataprotect/lint-baseline.xml
mobile/android/android-components/components/lib/fetch-httpurlconnection/lint-baseline.xml
mobile/android/android-components/components/lib/fetch-okhttp/lint-baseline.xml
mobile/android/android-components/components/lib/jexl/lint-baseline.xml
mobile/android/android-components/components/lib/publicsuffixlist/lint-baseline.xml
mobile/android/android-components/components/lib/push-firebase/lint-baseline.xml
mobile/android/android-components/components/lib/state/lint-baseline.xml
mobile/android/android-components/components/service/digitalassetlinks/lint-baseline.xml
mobile/android/android-components/components/service/firefox-accounts/lint-baseline.xml
mobile/android/android-components/components/service/glean/lint-baseline.xml
mobile/android/android-components/components/service/location/lint-baseline.xml
mobile/android/android-components/components/service/mars/lint-baseline.xml
mobile/android/android-components/components/service/nimbus/lint-baseline.xml
mobile/android/android-components/components/service/pocket/lint-baseline.xml
mobile/android/android-components/components/service/sync-autofill/lint-baseline.xml
mobile/android/android-components/components/service/sync-logins/lint-baseline.xml
mobile/android/android-components/components/support/android-test/lint-baseline.xml
mobile/android/android-components/components/support/base/lint-baseline.xml
mobile/android/android-components/components/support/images/lint-baseline.xml
mobile/android/android-components/components/support/ktx/lint-baseline.xml
mobile/android/android-components/components/support/license/lint-baseline.xml
mobile/android/android-components/components/support/locale/lint-baseline.xml
mobile/android/android-components/components/support/remotesettings/lint-baseline.xml
mobile/android/android-components/components/support/rusterrors/lint-baseline.xml
mobile/android/android-components/components/support/rusthttp/lint-baseline.xml
mobile/android/android-components/components/support/rustlog/lint-baseline.xml
mobile/android/android-components/components/support/test-appservices/lint-baseline.xml
mobile/android/android-components/components/support/test-fakes/lint-baseline.xml
mobile/android/android-components/components/support/test-libstate/lint-baseline.xml
mobile/android/android-components/components/support/test/lint-baseline.xml
mobile/android/android-components/components/support/utils/lint-baseline.xml
mobile/android/android-components/components/support/webextensions/lint-baseline.xml
mobile/android/android-components/components/tooling/fetch-tests/lint-baseline.xml
mobile/android/android-components/components/ui/autocomplete/lint-baseline.xml
mobile/android/android-components/components/ui/colors/lint-baseline.xml
mobile/android/android-components/components/ui/fonts/lint-baseline.xml
mobile/android/android-components/components/ui/icons/lint-baseline.xml
mobile/android/android-components/components/ui/tabcounter/lint-baseline.xml
mobile/android/android-components/components/ui/widgets/lint-baseline.xml
mobile/android/android-components/samples/browser/lint-baseline.xml
mobile/android/android-components/samples/compose-browser/lint-baseline.xml
mobile/android/android-components/samples/crash/lint-baseline.xml
mobile/android/android-components/samples/dataprotect/lint-baseline.xml
mobile/android/android-components/samples/firefox-accounts/lint-baseline.xml
mobile/android/android-components/samples/glean/lint-baseline.xml
mobile/android/android-components/samples/glean/samples-glean-library/lint-baseline.xml
mobile/android/android-components/samples/sync-logins/lint-baseline.xml
mobile/android/android-components/samples/sync/lint-baseline.xml
mobile/android/android-components/samples/toolbar/lint-baseline.xml
mobile/android/fenix/app/lint-baseline.xml
mobile/android/fenix/app/src/debug/res/raw/initial_experiments.json
mobile/android/fenix/app/src/main/res/
@@ -1575,7 +1693,8 @@ toolkit/components/pdfjs/PdfJsDefaultPrefs.js
toolkit/components/pdfjs/PdfJsOverridePrefs.js
toolkit/components/uniffi-js/GeneratedScaffolding.cpp
toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated
tools/@types/tspaths.json
tools/@types/generated/
tools/@types/subs/
tools/browsertime/package.json
tools/browsertime/package-lock.json
tools/ts/error_list.json

View File

@@ -1,8 +1,8 @@
# Gecko typelibs
This directory contains TypeScript declarations for types and components
exposed to js on the Gecko platform. lib.gecko.*.d.ts files are generated
from xpidl and webidl sources using tools/ts/build_*.js scripts.
This directory contains generated TypeScript declarations for types and components
exposed to js on the Gecko platform. The files are generated
from various sources in the tree using tools/ts/build_*.js scripts.
If you're modifying some of the interfaces or other source files, until we
find the best way to integrate this process, updating the typelibs is optional.
@@ -15,6 +15,9 @@ them alongside your changes. Because this step is not automated, it's likely
it will pick up previous updates unrelated to your patch, in which case it
might be worth splitting out into a separate commit.
There are also other ``mach ts`` commands for generating the files not updated
with the command above.
If there's an error with the process, updating the typelibs is not a blocker
for landing your patch, but please file a bug in the Linting and Formatting
component and ni?zombie.

View File

@@ -9,6 +9,7 @@ export interface LazyModules {
"chrome://browser/content/nsContextMenu.sys.mjs": typeof import("chrome://browser/content/nsContextMenu.sys.mjs"),
"chrome://devtools-startup/content/DevToolsShim.sys.mjs": typeof import("chrome://devtools-startup/content/DevToolsShim.sys.mjs"),
"chrome://global/content/ml/BlockWords.sys.mjs": typeof import("chrome://global/content/ml/BlockWords.sys.mjs"),
"chrome://global/content/ml/EmbeddingsGenerator.sys.mjs": typeof import("chrome://global/content/ml/EmbeddingsGenerator.sys.mjs"),
"chrome://global/content/ml/EngineProcess.sys.mjs": typeof import("chrome://global/content/ml/EngineProcess.sys.mjs"),
"chrome://global/content/ml/HttpInference.sys.mjs": typeof import("chrome://global/content/ml/HttpInference.sys.mjs"),
"chrome://global/content/ml/ModelHub.sys.mjs": typeof import("chrome://global/content/ml/ModelHub.sys.mjs"),
@@ -187,21 +188,27 @@ export interface LazyModules {
"chrome://remote/content/webdriver-bidi/modules/windowglobal/log.sys.mjs": typeof import("chrome://remote/content/webdriver-bidi/modules/windowglobal/log.sys.mjs"),
"chrome://remote/content/webdriver-bidi/modules/windowglobal/network.sys.mjs": typeof import("chrome://remote/content/webdriver-bidi/modules/windowglobal/network.sys.mjs"),
"chrome://remote/content/webdriver-bidi/modules/windowglobal/script.sys.mjs": typeof import("chrome://remote/content/webdriver-bidi/modules/windowglobal/script.sys.mjs"),
"moz-src:///browser/components/DefaultBrowserCheck.sys.mjs": typeof import("moz-src:///browser/components/DefaultBrowserCheck.sys.mjs"),
"moz-src:///browser/components/DesktopActorRegistry.sys.mjs": typeof import("moz-src:///browser/components/DesktopActorRegistry.sys.mjs"),
"moz-src:///browser/components/ProfileDataUpgrader.sys.mjs": typeof import("moz-src:///browser/components/ProfileDataUpgrader.sys.mjs"),
"moz-src:///browser/components/genai/LinkPreviewModel.sys.mjs": typeof import("moz-src:///browser/components/genai/LinkPreviewModel.sys.mjs"),
"moz-src:///browser/components/protections/ContentBlockingPrefs.sys.mjs": typeof import("moz-src:///browser/components/protections/ContentBlockingPrefs.sys.mjs"),
"moz-src:///browser/components/search/BrowserSearchTelemetry.sys.mjs": typeof import("moz-src:///browser/components/search/BrowserSearchTelemetry.sys.mjs"),
"moz-src:///browser/components/search/OpenSearchManager.sys.mjs": typeof import("moz-src:///browser/components/search/OpenSearchManager.sys.mjs"),
"moz-src:///browser/components/search/SERPCategorization.sys.mjs": typeof import("moz-src:///browser/components/search/SERPCategorization.sys.mjs"),
"moz-src:///browser/components/search/SearchOneOffs.sys.mjs": typeof import("moz-src:///browser/components/search/SearchOneOffs.sys.mjs"),
"moz-src:///browser/components/search/SearchSERPTelemetry.sys.mjs": typeof import("moz-src:///browser/components/search/SearchSERPTelemetry.sys.mjs"),
"moz-src:///browser/components/search/SearchUIUtils.sys.mjs": typeof import("moz-src:///browser/components/search/SearchUIUtils.sys.mjs"),
"moz-src:///browser/components/shell/StartupOSIntegration.sys.mjs": typeof import("moz-src:///browser/components/shell/StartupOSIntegration.sys.mjs"),
"moz-src:///browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/AsyncTabSwitcher.sys.mjs"),
"moz-src:///browser/components/tabbrowser/GroupsList.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/GroupsList.sys.mjs"),
"moz-src:///browser/components/tabbrowser/NewTabPagePreloading.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/NewTabPagePreloading.sys.mjs"),
"moz-src:///browser/components/tabbrowser/OpenInTabsUtils.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/OpenInTabsUtils.sys.mjs"),
"moz-src:///browser/components/tabbrowser/SmartTabGrouping.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/SmartTabGrouping.sys.mjs"),
"moz-src:///browser/components/tabbrowser/TabGroupMetrics.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/TabGroupMetrics.sys.mjs"),
"moz-src:///browser/components/tabbrowser/TabMetrics.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/TabMetrics.sys.mjs"),
"moz-src:///browser/components/tabbrowser/TabsList.sys.mjs": typeof import("moz-src:///browser/components/tabbrowser/TabsList.sys.mjs"),
"moz-src:///browser/components/uitour/UITour.sys.mjs": typeof import("moz-src:///browser/components/uitour/UITour.sys.mjs"),
"moz-src:///browser/themes/ToolbarIconColor.sys.mjs": typeof import("moz-src:///browser/themes/ToolbarIconColor.sys.mjs"),
"moz-src:///toolkit/components/reader/AboutReader.sys.mjs": typeof import("moz-src:///toolkit/components/reader/AboutReader.sys.mjs"),
"moz-src:///toolkit/components/reader/ReaderMode.sys.mjs": typeof import("moz-src:///toolkit/components/reader/ReaderMode.sys.mjs"),
"moz-src:///toolkit/components/reader/ReaderWorker.sys.mjs": typeof import("moz-src:///toolkit/components/reader/ReaderWorker.sys.mjs"),
@@ -236,9 +243,6 @@ export interface LazyModules {
"resource:///modules/CustomizableUI.sys.mjs": typeof import("resource:///modules/CustomizableUI.sys.mjs"),
"resource:///modules/CustomizableWidgets.sys.mjs": typeof import("resource:///modules/CustomizableWidgets.sys.mjs"),
"resource:///modules/Discovery.sys.mjs": typeof import("resource:///modules/Discovery.sys.mjs"),
"resource:///modules/DoHConfig.sys.mjs": typeof import("resource:///modules/DoHConfig.sys.mjs"),
"resource:///modules/DoHController.sys.mjs": typeof import("resource:///modules/DoHController.sys.mjs"),
"resource:///modules/DoHHeuristics.sys.mjs": typeof import("resource:///modules/DoHHeuristics.sys.mjs"),
"resource:///modules/DownloadSpamProtection.sys.mjs": typeof import("resource:///modules/DownloadSpamProtection.sys.mjs"),
"resource:///modules/DownloadsCommon.sys.mjs": typeof import("resource:///modules/DownloadsCommon.sys.mjs"),
"resource:///modules/DownloadsViewUI.sys.mjs": typeof import("resource:///modules/DownloadsViewUI.sys.mjs"),
@@ -378,6 +382,7 @@ export interface LazyModules {
"resource:///modules/policies/ProxyPolicies.sys.mjs": typeof import("resource:///modules/policies/ProxyPolicies.sys.mjs"),
"resource:///modules/policies/WebsiteFilter.sys.mjs": typeof import("resource:///modules/policies/WebsiteFilter.sys.mjs"),
"resource:///modules/policies/schema.sys.mjs": typeof import("resource:///modules/policies/schema.sys.mjs"),
"resource:///modules/profiles/ProfilesDatastoreService.sys.mjs": typeof import("resource:///modules/profiles/ProfilesDatastoreService.sys.mjs"),
"resource:///modules/profiles/SelectableProfileService.sys.mjs": typeof import("resource:///modules/profiles/SelectableProfileService.sys.mjs"),
"resource:///modules/sessionstore/PageWireframes.sys.mjs": typeof import("resource:///modules/sessionstore/PageWireframes.sys.mjs"),
"resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs": typeof import("resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs"),
@@ -484,6 +489,7 @@ export interface LazyModules {
"resource://gre/modules/ClientID.sys.mjs": typeof import("resource://gre/modules/ClientID.sys.mjs"),
"resource://gre/modules/ClipboardContextMenu.sys.mjs": typeof import("resource://gre/modules/ClipboardContextMenu.sys.mjs"),
"resource://gre/modules/Color.sys.mjs": typeof import("resource://gre/modules/Color.sys.mjs"),
"resource://gre/modules/ColorwayThemeMigration.sys.mjs": typeof import("resource://gre/modules/ColorwayThemeMigration.sys.mjs"),
"resource://gre/modules/CommonDialog.sys.mjs": typeof import("resource://gre/modules/CommonDialog.sys.mjs"),
"resource://gre/modules/ConduitsParent.sys.mjs": typeof import("resource://gre/modules/ConduitsParent.sys.mjs"),
"resource://gre/modules/Console.sys.mjs": typeof import("resource://gre/modules/Console.sys.mjs"),
@@ -502,6 +508,9 @@ export interface LazyModules {
"resource://gre/modules/DAPVisitCounter.sys.mjs": typeof import("resource://gre/modules/DAPVisitCounter.sys.mjs"),
"resource://gre/modules/DateTimePickerPanel.sys.mjs": typeof import("resource://gre/modules/DateTimePickerPanel.sys.mjs"),
"resource://gre/modules/DeferredTask.sys.mjs": typeof import("resource://gre/modules/DeferredTask.sys.mjs"),
"resource://gre/modules/DoHConfig.sys.mjs": typeof import("resource://gre/modules/DoHConfig.sys.mjs"),
"resource://gre/modules/DoHController.sys.mjs": typeof import("resource://gre/modules/DoHController.sys.mjs"),
"resource://gre/modules/DoHHeuristics.sys.mjs": typeof import("resource://gre/modules/DoHHeuristics.sys.mjs"),
"resource://gre/modules/DownloadCore.sys.mjs": typeof import("resource://gre/modules/DownloadCore.sys.mjs"),
"resource://gre/modules/DownloadHistory.sys.mjs": typeof import("resource://gre/modules/DownloadHistory.sys.mjs"),
"resource://gre/modules/DownloadIntegration.sys.mjs": typeof import("resource://gre/modules/DownloadIntegration.sys.mjs"),
@@ -648,6 +657,8 @@ export interface LazyModules {
"resource://gre/modules/PlacesDBUtils.sys.mjs": typeof import("resource://gre/modules/PlacesDBUtils.sys.mjs"),
"resource://gre/modules/PlacesPreviews.sys.mjs": typeof import("resource://gre/modules/PlacesPreviews.sys.mjs"),
"resource://gre/modules/PlacesQuery.sys.mjs": typeof import("resource://gre/modules/PlacesQuery.sys.mjs"),
"resource://gre/modules/PlacesSemanticHistoryDatabase.sys.mjs": typeof import("resource://gre/modules/PlacesSemanticHistoryDatabase.sys.mjs"),
"resource://gre/modules/PlacesSemanticHistoryManager.sys.mjs": typeof import("resource://gre/modules/PlacesSemanticHistoryManager.sys.mjs"),
"resource://gre/modules/PlacesSyncUtils.sys.mjs": typeof import("resource://gre/modules/PlacesSyncUtils.sys.mjs"),
"resource://gre/modules/PlacesTransactions.sys.mjs": typeof import("resource://gre/modules/PlacesTransactions.sys.mjs"),
"resource://gre/modules/PlacesUtils.sys.mjs": typeof import("resource://gre/modules/PlacesUtils.sys.mjs"),
@@ -798,6 +809,7 @@ export interface LazyModules {
"resource://newtab/lib/DownloadsManager.sys.mjs": typeof import("resource://newtab/lib/DownloadsManager.sys.mjs"),
"resource://newtab/lib/FaviconFeed.sys.mjs": typeof import("resource://newtab/lib/FaviconFeed.sys.mjs"),
"resource://newtab/lib/HighlightsFeed.sys.mjs": typeof import("resource://newtab/lib/HighlightsFeed.sys.mjs"),
"resource://newtab/lib/NewTabGleanUtils.sys.mjs": typeof import("resource://newtab/lib/NewTabGleanUtils.sys.mjs"),
"resource://newtab/lib/NewTabInit.sys.mjs": typeof import("resource://newtab/lib/NewTabInit.sys.mjs"),
"resource://newtab/lib/NewTabMessaging.sys.mjs": typeof import("resource://newtab/lib/NewTabMessaging.sys.mjs"),
"resource://newtab/lib/PersistentCache.sys.mjs": typeof import("resource://newtab/lib/PersistentCache.sys.mjs"),

View File

@@ -1,6 +1,6 @@
{
"compilerOptions": {
"baseUrl": "../../",
"baseUrl": "../../..",
"paths": {
"chrome://browser/content/aboutlogins/aboutLoginsUtils.mjs": [
"browser/components/aboutlogins/content/aboutLoginsUtils.mjs"
@@ -290,6 +290,9 @@
"chrome://global/content/ml/ClusterAlgos.sys.mjs": [
"toolkit/components/ml/content/ClusterAlgos.sys.mjs"
],
"chrome://global/content/ml/EmbeddingsGenerator.sys.mjs": [
"toolkit/components/ml/content/nlp/EmbeddingsGenerator.sys.mjs"
],
"chrome://global/content/ml/EngineProcess.sys.mjs": [
"toolkit/components/ml/content/EngineProcess.sys.mjs"
],
@@ -1079,15 +1082,6 @@
"resource:///modules/Discovery.sys.mjs": [
"browser/modules/Discovery.sys.mjs"
],
"resource:///modules/DoHConfig.sys.mjs": [
"browser/components/doh/DoHConfig.sys.mjs"
],
"resource:///modules/DoHController.sys.mjs": [
"browser/components/doh/DoHController.sys.mjs"
],
"resource:///modules/DoHHeuristics.sys.mjs": [
"browser/components/doh/DoHHeuristics.sys.mjs"
],
"resource:///modules/DownloadSpamProtection.sys.mjs": [
"browser/components/downloads/DownloadSpamProtection.sys.mjs"
],
@@ -1278,7 +1272,7 @@
"browser/components/firefoxview/SyncedTabsController.sys.mjs"
],
"resource:///modules/TRRPerformance.sys.mjs": [
"browser/components/doh/TRRPerformance.sys.mjs"
"toolkit/components/doh/TRRPerformance.sys.mjs"
],
"resource:///modules/ThemeVariableMap.sys.mjs": [
"browser/themes/ThemeVariableMap.sys.mjs"
@@ -1580,6 +1574,9 @@
"resource:///modules/policies/schema.sys.mjs": [
"tools/@types/subs/schema.sys.d.mts"
],
"resource:///modules/profiles/ProfilesDatastoreService.sys.mjs": [
"browser/components/profiles/ProfilesDatastoreService.sys.mjs"
],
"resource:///modules/profiles/SelectableProfile.sys.mjs": [
"browser/components/profiles/SelectableProfile.sys.mjs"
],
@@ -5621,6 +5618,9 @@
"resource://gre/modules/Color.sys.mjs": [
"toolkit/modules/Color.sys.mjs"
],
"resource://gre/modules/ColorwayThemeMigration.sys.mjs": [
"toolkit/mozapps/extensions/ColorwayThemeMigration.sys.mjs"
],
"resource://gre/modules/CommonDialog.sys.mjs": [
"toolkit/components/prompts/src/CommonDialog.sys.mjs"
],
@@ -5699,6 +5699,15 @@
"resource://gre/modules/DelayedInit.sys.mjs": [
"mobile/shared/modules/geckoview/DelayedInit.sys.mjs"
],
"resource://gre/modules/DoHConfig.sys.mjs": [
"toolkit/components/doh/DoHConfig.sys.mjs"
],
"resource://gre/modules/DoHController.sys.mjs": [
"toolkit/components/doh/DoHController.sys.mjs"
],
"resource://gre/modules/DoHHeuristics.sys.mjs": [
"toolkit/components/doh/DoHHeuristics.sys.mjs"
],
"resource://gre/modules/DownloadCore.sys.mjs": [
"toolkit/components/downloads/DownloadCore.sys.mjs"
],
@@ -6215,6 +6224,12 @@
"resource://gre/modules/PlacesQuery.sys.mjs": [
"toolkit/components/places/PlacesQuery.sys.mjs"
],
"resource://gre/modules/PlacesSemanticHistoryDatabase.sys.mjs": [
"toolkit/components/places/PlacesSemanticHistoryDatabase.sys.mjs"
],
"resource://gre/modules/PlacesSemanticHistoryManager.sys.mjs": [
"toolkit/components/places/PlacesSemanticHistoryManager.sys.mjs"
],
"resource://gre/modules/PlacesSyncUtils.sys.mjs": [
"toolkit/components/places/PlacesSyncUtils.sys.mjs"
],
@@ -6416,6 +6431,9 @@
"resource://gre/modules/SyncedBookmarksMirror.sys.mjs": [
"toolkit/components/places/SyncedBookmarksMirror.sys.mjs"
],
"resource://gre/modules/TRRPerformance.sys.mjs": [
"toolkit/components/doh/TRRPerformance.sys.mjs"
],
"resource://gre/modules/TaskScheduler.sys.mjs": [
"toolkit/components/taskscheduler/TaskScheduler.sys.mjs"
],
@@ -6845,6 +6863,9 @@
"resource://newtab/lib/HighlightsFeed.sys.mjs": [
"browser/extensions/newtab/lib/HighlightsFeed.sys.mjs"
],
"resource://newtab/lib/NewTabGleanUtils.sys.mjs": [
"browser/extensions/newtab/lib/NewTabGleanUtils.sys.mjs"
],
"resource://newtab/lib/NewTabInit.sys.mjs": [
"browser/extensions/newtab/lib/NewTabInit.sys.mjs"
],
@@ -7419,7 +7440,7 @@
"browser/base/content/test/fullscreen/DOMFullscreenTestUtils.sys.mjs"
],
"resource://testing-common/DoHTestUtils.sys.mjs": [
"browser/components/doh/DoHTestUtils.sys.mjs"
"toolkit/components/doh/DoHTestUtils.sys.mjs"
],
"resource://testing-common/EnterprisePolicyTesting.sys.mjs": [
"toolkit/components/enterprisepolicies/tests/EnterprisePolicyTesting.sys.mjs"

View File

@@ -1,23 +1,22 @@
/**
* NOTE: Do not modify this file by hand.
* If you're updating some of the sources, see README for instructions.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/// <reference lib="es2024" />
/// <reference lib="esnext.iterator" />
/// <reference types="./lib.gecko.custom.d.ts" />
/// <reference types="./lib.gecko.dom.d.ts" />
/// <reference types="./lib.gecko.glean.d.ts" />
/// <reference types="./lib.gecko.nsresult.d.ts" />
/// <reference types="./lib.gecko.services.d.ts" />
/// <reference types="./lib.gecko.xpcom.d.ts" />
/// <reference types="./generated/lib.gecko.dom.d.ts" />
/// <reference types="./generated/lib.gecko.glean.d.ts" />
/// <reference types="./generated/lib.gecko.nsresult.d.ts" />
/// <reference types="./generated/lib.gecko.services.d.ts" />
/// <reference types="./generated/lib.gecko.xpcom.d.ts" />
/// <reference types="./lib.gecko.xpidl.d.ts" />
/// Platform specific XPCOM modules.
/// <reference types="./lib.gecko.darwin.d.ts" />
/// <reference types="./lib.gecko.linux.d.ts" />
/// <reference types="./lib.gecko.win32.d.ts" />
/// <reference types="./generated/lib.gecko.darwin.d.ts" />
/// <reference types="./generated/lib.gecko.linux.d.ts" />
/// <reference types="./generated/lib.gecko.win32.d.ts" />
/// Order of references matters here, for overriding type signatures.
/// <reference types="./lib.gecko.tweaks.d.ts" />

View File

@@ -23,7 +23,7 @@ declare global {
type Exports<M, P> = M extends keyof LazyModules ? IfKey<LazyModules[M], P> : never;
type IfKey<T, K> = K extends keyof T ? T[K] : never;
type LazyModules = import("./lib.gecko.modules").LazyModules;
type LazyModules = import("./generated/lib.gecko.modules").LazyModules;
type Widen<T> =
T extends boolean ? boolean :

View File

@@ -1,5 +1,5 @@
{
"extends": "./tspaths.json",
"extends": "./generated/tspaths.json",
"compilerOptions": {
"noEmit": true,

View File

@@ -219,7 +219,8 @@ toolkit/components/pdfjs/PdfJsDefaultPrefs.js
toolkit/components/pdfjs/PdfJsOverridePrefs.js
toolkit/components/uniffi-js/GeneratedScaffolding.cpp
toolkit/components/uniffi-bindgen-gecko-js/fixtures/generated
tools/@types/tspaths.json
tools/@types/generated/
tools/@types/subs/
tools/browsertime/package.json
tools/browsertime/package-lock.json
tools/ts/error_list.json

View File

@@ -4,14 +4,15 @@
"use strict";
/**
* Build: <srcdir>/tools/@types/glean/<path>.d.ts,
* update: <srcdir>/tools/@types/lib.gecko.glean.d.ts,
* Build: <srcdir>/tools/@types/generated/lib.gecko.glean.d.ts,
*
* from: <srcdir>/<path>/metrics.yaml.
* from: all glean sources referenced in
+ <srcdir>/toolkit/components/glean/metrics_index.py.
*/
const fs = require("fs");
const YAML = require("yaml");
const path = require("path");
const HEADER = `/**
* NOTE: Do not modify this file by hand.
@@ -100,15 +101,15 @@ function emitGleanPings(yamlDoc) {
}
// Build lib.gecko.glean.d.ts.
async function main(src_dir, ...paths) {
let lib = `${src_dir}/tools/@types/lib.gecko.glean.d.ts`;
async function main(src_dir, typelib_dir, ...paths) {
let lib = path.join(typelib_dir, "lib.gecko.glean.d.ts");
let metrics = {};
let pings = {};
for (let path of paths) {
console.log(`[INFO] ${path}`);
let yaml = fs.readFileSync(`${src_dir}/${path}`, "utf8");
for (let gleanPath of paths) {
console.log(`[INFO] ${gleanPath}`);
let yaml = fs.readFileSync(`${src_dir}/${gleanPath}`, "utf8");
let parsed = YAML.parse(yaml, { merge: true, schema: "failsafe" });
if (parsed.$schema === `${SCHEMA}/metrics/2-0-0`) {

View File

@@ -4,13 +4,14 @@
"use strict";
/**
* Build: <srcdir>/tools/@types/tspaths.json, and
* <srcdir>/tools/@types/lib.gecko.modules.d.ts
* Build: <srcdir>/tools/@types/generated/tspaths.json, and
* <srcdir>/tools/@types/generated/lib.gecko.modules.d.ts
*
* from: various import forms in all *.js and *.mjs sources.
*/
const fs = require("fs");
const path = require("path");
const { fixed } = require("./config/fixed_paths.js");
const HEADER = `/**
@@ -24,8 +25,8 @@ const IMPORT =
/(\bimport |import\(|require\(|\.importESModule\(|\.(defineESModuleGetters?|declareLazy|defineLazy)\()[^;]+/gm;
const URI = /("|')((resource|chrome|moz-src):\/\/[\w\d\/_.-]+\.m?js)\1/gm;
function ignore(path) {
return IGNORE.some(re => path.match(re));
function ignore(filePath) {
return IGNORE.some(re => filePath.match(re));
}
// Scan the root dir for *.js and *.mjs files, recursivelly.
@@ -40,14 +41,14 @@ function scan(root, dir, files) {
}
// Emit path mapping for all found module URIs.
function emitPaths(files, uris, modules) {
function emitPaths(files, uris, modules, relativeBasePath) {
let paths = {};
for (let uri of [...uris].sort()) {
if (uri in fixed) {
continue;
}
let parts = uri.split("/");
let path = "";
let filePath = "";
let matches;
// Check for a substitution .d.ts file from processed/generated sources.
@@ -59,8 +60,8 @@ function emitPaths(files, uris, modules) {
// Starting with just the file name, add each path part going backwards.
do {
path = "/" + parts.pop() + path;
matches = files.filter(f => f.endsWith(path));
filePath = "/" + parts.pop() + filePath;
matches = files.filter(f => f.endsWith(filePath));
// While multiple files match, add parts used for filtering.
} while (matches.length > 1 && parts.length);
@@ -75,7 +76,7 @@ function emitPaths(files, uris, modules) {
}
Object.assign(paths, fixed);
let tspaths = { compilerOptions: { baseUrl: "../../", paths } };
let tspaths = { compilerOptions: { baseUrl: relativeBasePath, paths } };
return JSON.stringify(tspaths, null, 2) + "\n";
}
@@ -112,7 +113,12 @@ function main(root_dir, paths_json, lib_lazy) {
}
}
let json = emitPaths(files, uris, modules);
let json = emitPaths(
files,
uris,
modules,
path.relative(path.dirname(paths_json), root_dir)
);
console.log(`[INFO] ${paths_json} (${json.length.toLocaleString()} bytes)`);
fs.writeFileSync(paths_json, json);

View File

@@ -9,7 +9,7 @@
* build_paths.js script can't match automatically.
*
* If TypeScript or your editor can't find your (new) module in
* `tools/@types/tspaths.json` try running `mach ts paths` first.
* `tools/@types/generated/tspaths.json` try running `mach ts paths` first.
*/
exports.fixed = {
"chrome://global/content/ml/NLPUtils.sys.mjs": [

View File

@@ -98,7 +98,7 @@ def setup(ctx):
@SubCommand("ts", "update", description="Update tools/@types libraries.")
def update(ctx):
typelib_dir = mozpath.join(ctx.topsrcdir, "tools/@types")
typelib_dir = mozpath.join(ctx.topsrcdir, "tools/@types/generated")
platforms = ["darwin", "linux", "win32"]
for lib in targets + platforms:
@@ -124,15 +124,19 @@ def glean(ctx):
sys.path.append(mozpath.join(ctx.topsrcdir, "toolkit/components/glean/"))
from metrics_index import metrics_yamls, pings_yamls
typelib_dir = mozpath.join(ctx.topsrcdir, "tools/@types/generated")
maybe_setup(ctx)
return node(ctx, "build_glean", ctx.topsrcdir, *metrics_yamls, *pings_yamls)
return node(
ctx, "build_glean", ctx.topsrcdir, typelib_dir, *metrics_yamls, *pings_yamls
)
@SubCommand("ts", "paths", description="Build module path mapping.")
def paths(ctx):
maybe_setup(ctx)
lib = mozpath.join(ctx.topsrcdir, "tools/@types/tspaths.json")
lazy = mozpath.join(ctx.topsrcdir, "tools/@types/lib.gecko.modules.d.ts")
lib = mozpath.join(ctx.topsrcdir, "tools/@types/generated/tspaths.json")
lazy = mozpath.join(ctx.topsrcdir, "tools/@types/generated/lib.gecko.modules.d.ts")
return node(ctx, "build_paths", ctx.topsrcdir, lib, lazy)