Skip to content

Commit 774dde2

Browse files
committed
test: canary one export per submodule in the entry-load probe
The probe checked four exports against the ten submodules index.ts re-exports, so a build that dropped storage, functions, database, performance, remote-config or sdk from the artifact still passed. The source-level jobs cannot catch that: only this probe loads the packed build.
1 parent ce5bf75 commit 774dde2

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎scripts/entry-load.mjs‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,20 @@ export const DEFAULT_REACT_VERSIONS = ['18', '19'];
4040
export const FIREBASE_RANGE = '^11.10.0';
4141

4242
// A load that resolves but exports nothing is still a broken package, and an
43-
// empty or partial build would otherwise pass. These are load-bearing entry
44-
// points from different submodules, so a missing re-export shows up here.
45-
export const EXPECTED_EXPORTS = ['useFirestoreDocData', 'useUser', 'FirebaseAppProvider', 'useObservable'];
43+
// empty or partial build would otherwise pass. One canary per submodule that
44+
// index.ts re-exports, so a drop confined to any single one shows up here.
45+
export const EXPECTED_EXPORTS = [
46+
'useUser', // ./auth
47+
'useDatabaseObject', // ./database
48+
'FirebaseAppProvider', // ./firebaseApp
49+
'useFirestoreDocData', // ./firestore
50+
'useCallableFunctionResponse', // ./functions
51+
'SuspenseWithPerf', // ./performance
52+
'useRemoteConfigValue', // ./remote-config
53+
'useStorageDownloadURL', // ./storage
54+
'useObservable', // ./useObservable
55+
'AuthSdkContext', // ./sdk
56+
];
4657

4758
export const PACKAGE_NAME = 'reactfire';
4859

0 commit comments

Comments
 (0)