Skip to content

Add app-compat hack #4036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
},
"devDependencies": {
"@firebase/app": "0.6.12",
"@firebase/app-compat": "0.x",
"@rollup/plugin-alias": "3.1.1",
"@types/json-stable-stringify": "1.0.32",
"json-stable-stringify": "1.0.1",
Expand Down
23 changes: 23 additions & 0 deletions scripts/ci-test/build_changed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ const argv = yargs.options({
type: 'boolean',
desc:
'whether or not build @firebase/app-exp first. It is a hack required to build Firestore'
},
buildAppCompat: {
type: 'boolean',
desc:
'whether or not build @firebase/app-compat first. It is a hack required to build Firestore'
}
}).argv;

const allTestConfigNames = Object.keys(testConfig);
const inputTestConfigName = argv._[0];
const buildAppExp = argv.buildAppExp;
const buildAppCompat = argv.buildAppCompat;

if (!inputTestConfigName) {
throw Error(`
Expand Down Expand Up @@ -82,6 +88,23 @@ async function buildForTests(config: TestConfig, buildAppExp = false) {
{ stdio: 'inherit', cwd: root }
);
}
// hack to build Firestore which depends on @firebase/app-exp (because of firestore exp),
// but doesn't list it as a dependency in its package.json
// TODO: remove once modular SDKs become official
if (buildAppCompat) {
await spawn(
'npx',
[
'lerna',
'run',
'--scope',
'@firebase/app-compat',
'--include-dependencies',
'build'
],
{ stdio: 'inherit', cwd: root }
);
}

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