Skip to content

Commit 36fb4c7

Browse files
authored
Add app-compat hack (#4036)
1 parent 0fb56e1 commit 36fb4c7

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

packages/firestore/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
},
8080
"devDependencies": {
8181
"@firebase/app": "0.6.12",
82-
"@firebase/app-compat": "0.x",
8382
"@rollup/plugin-alias": "3.1.1",
8483
"@types/json-stable-stringify": "1.0.32",
8584
"json-stable-stringify": "1.0.1",

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)