Skip to content

Commit 559b8d3

Browse files
authored
Merge 88db278 into 2ca34ce
2 parents 2ca34ce + 88db278 commit 559b8d3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

scripts/ci-test/build_changed.ts

+23
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,18 @@ const argv = yargs.options({
2929
type: 'boolean',
3030
desc:
3131
'whether or not build @firebase/app-exp first. It is a hack required to build Firestore'
32+
},
33+
buildAppCompat: {
34+
type: 'boolean',
35+
desc:
36+
'whether or not build @firebase/app-compat first. It is a hack required to build Firestore'
3237
}
3338
}).argv;
3439

3540
const allTestConfigNames = Object.keys(testConfig);
3641
const inputTestConfigName = argv._[0];
3742
const buildAppExp = argv.buildAppExp;
43+
const buildAppCompat = argv.buildAppCompat;
3844

3945
if (!inputTestConfigName) {
4046
throw Error(`
@@ -82,6 +88,23 @@ async function buildForTests(config: TestConfig, buildAppExp = false) {
8288
{ stdio: 'inherit', cwd: root }
8389
);
8490
}
91+
// hack to build Firestore which depends on @firebase/app-exp (because of firestore exp),
92+
// but doesn't list it as a dependency in its package.json
93+
// TODO: remove once modular SDKs become official
94+
if (buildAppCompat) {
95+
await spawn(
96+
'npx',
97+
[
98+
'lerna',
99+
'run',
100+
'--scope',
101+
'@firebase/app-compat',
102+
'--include-dependencies',
103+
'build'
104+
],
105+
{ stdio: 'inherit', cwd: root }
106+
);
107+
}
85108

86109
const lernaCmd = ['lerna', 'run'];
87110
console.log(chalk`{blue Running build in:}`);

0 commit comments

Comments
 (0)