Skip to content

Commit 172f800

Browse files
committed
Exp release fixes
1 parent f18a6d4 commit 172f800

File tree

2 files changed

+48
-5
lines changed

2 files changed

+48
-5
lines changed

packages-exp/analytics-exp/src/index.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ import {
2727
import { ERROR_FACTORY, AnalyticsError } from './errors';
2828
import { logEvent } from './api';
2929
import { name, version } from '../package.json';
30-
import { AnalyticsCallOptions } from '@firebase/analytics-types-exp';
30+
31+
import {
32+
Analytics,
33+
AnalyticsCallOptions,
34+
SettingsOptions,
35+
ControlParams,
36+
EventParams,
37+
CustomParams,
38+
Item,
39+
Promotion
40+
} from '@firebase/analytics-types-exp';
3141

3242
declare global {
3343
interface Window {
@@ -81,14 +91,15 @@ function registerAnalytics(): void {
8191
registerAnalytics();
8292

8393
export * from './api';
84-
85-
export type {
94+
/**
95+
* Public types.
96+
*/
97+
export {
8698
Analytics,
87-
AnalyticsCallOptions,
8899
SettingsOptions,
89100
ControlParams,
90101
EventParams,
91102
CustomParams,
92103
Item,
93104
Promotion
94-
} from '@firebase/analytics-types-exp';
105+
};

scripts/exp/release.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,26 @@ async function buildPackages() {
216216
}
217217
);
218218

219+
// Build app-exp but revert typings
220+
await spawn(
221+
'yarn',
222+
['lerna', 'run', '--scope', '@firebase/app-exp', 'build:release'],
223+
{
224+
cwd: projectRoot,
225+
stdio: 'inherit'
226+
}
227+
);
228+
229+
// Revert app-exp typings to internal
230+
await spawn(
231+
'yarn',
232+
['lerna', 'run', '--scope', '@firebase/app-exp', 'typings:internal'],
233+
{
234+
cwd: projectRoot,
235+
stdio: 'inherit'
236+
}
237+
);
238+
219239
// Build exp and compat packages except for firebase-exp
220240
await spawn(
221241
'yarn',
@@ -226,6 +246,8 @@ async function buildPackages() {
226246
'@firebase/*-exp',
227247
'--scope',
228248
'@firebase/*-compat',
249+
'--ignore',
250+
'@firebase/app-exp',
229251
'build:release'
230252
],
231253
{
@@ -274,6 +296,16 @@ async function buildPackages() {
274296
}
275297
);
276298

299+
// Restore public app-exp typings
300+
await spawn(
301+
'yarn',
302+
['lerna', 'run', '--scope', '@firebase/app-exp', 'typings:public'],
303+
{
304+
cwd: projectRoot,
305+
stdio: 'inherit'
306+
}
307+
);
308+
277309
// remove packages/installations/dist, otherwise packages that depend on packages-exp/installations-exp (e.g. Perf, FCM)
278310
// will incorrectly reference packages/installations.
279311
const installationsDistDirPath = resolve(

0 commit comments

Comments
 (0)