Skip to content

Commit c599a4b

Browse files
committed
revert yarn.lock
1 parent cceee46 commit c599a4b

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

scripts/ci-test/build.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,30 @@ import chalk from 'chalk';
2121
import { resolve } from 'path';
2222
const root = resolve(__dirname, '../..');
2323

24-
export async function buildForTests(testTasks: TestTask[]) {
24+
export async function buildForTests(
25+
testTasks: TestTask[],
26+
buildAppExp = false
27+
) {
2528
try {
2629
if (testTasks.length === 0) {
2730
chalk`{green No test tasks. Skipping all tests }`;
28-
process.exit(0);
31+
}
32+
33+
// hack to build Firestore which depends on @firebase/app-exp (because of firestore exp),
34+
// but doesn't list it as a dependency in its package.json
35+
if (buildAppExp) {
36+
await spawn(
37+
'npx',
38+
[
39+
'lerna',
40+
'run',
41+
'--scope',
42+
'@firebase/app-exp',
43+
'--include-dependencies',
44+
'build'
45+
],
46+
{ stdio: 'inherit', cwd: root }
47+
);
2948
}
3049

3150
const lernaCmd = ['lerna', 'run'];
@@ -46,9 +65,7 @@ export async function buildForTests(testTasks: TestTask[]) {
4665

4766
lernaCmd.push('--include-dependencies', 'build');
4867
await spawn('npx', lernaCmd, { stdio: 'inherit', cwd: root });
49-
process.exit(0);
5068
} catch (e) {
5169
console.error(chalk`{red ${e}}`);
52-
process.exit(1);
5370
}
5471
}

scripts/ci-test/run_changed.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export async function getTestTasks(): Promise<TestTask[]> {
110110
console.log(
111111
chalk`{blue Running all tests because ${filename} was modified.}`
112112
);
113-
return allPackageNames.map(pkgName => createTestTask(pkgName));
113+
// run tests in all packages
114+
testTasks = allPackageNames.map(pkgName => createTestTask(pkgName));
115+
break;
114116
}
115117
// Files outside a package dir that should trigger its tests.
116118
const specialPathKeys = Object.keys(specialPaths) as Array<
@@ -169,7 +171,6 @@ export async function getTestTasks(): Promise<TestTask[]> {
169171
);
170172
}
171173

172-
// remove ignored packages
173174
testTasks = testTasks.filter(t => !ignoredPackages.includes(t.pkgName));
174175

175176
return testTasks;

scripts/ci-test/run_changed_firestore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const includeOnlyPackages = [
2626
async function run() {
2727
let testTasks = await getTestTasks();
2828
testTasks = testTasks.filter(t => includeOnlyPackages.includes(t.pkgName));
29-
await buildForTests(testTasks);
29+
await buildForTests(testTasks, true);
3030
runTests(testTasks);
3131
}
3232

scripts/ci-test/run_changed_no_firestore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function run() {
4444

4545
// remove the ignored packages from the tasks
4646
testTasks = testTasks.filter(t => !ignoredPackages.includes(t.pkgName));
47-
47+
console.log(testTasks);
4848
await buildForTests(testTasks);
4949

5050
runTests(testTasks);

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
88
integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
99
dependencies:
10-
"@babel/highlight" "^7.10.4"
10+
"@babel/highlight" "^7.10.4"
1111

1212
"@babel/compat-data@^7.10.4":
1313
version "7.10.5"

0 commit comments

Comments
 (0)