Skip to content

Commit 0a9c74f

Browse files
fix(test_downstream_projects): hopefully fix travis folding by not emitting whitespaces
1 parent 8c24f0f commit 0a9c74f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test_downstream_projects.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const yargs = require('yargs')
1414
const nodeCleanup = require('node-cleanup');
1515
const publishYalcPackage = require('./publish_yalc_package');
1616
const foldStart = (message) => {
17-
IS_TRAVIS && console.log('travis_fold:start:' + message);
17+
IS_TRAVIS && console.log('travis_fold:start:' + message.replace(/\s+/g, '.'));
1818
console.log(message);
19-
return () => IS_TRAVIS && console.log('travis_fold:end:' + message);
19+
return () => IS_TRAVIS && console.log('travis_fold:end:' + message.replace(/\s+/g, '.'));
2020
};
2121
let foldEnd = () => null;
2222

@@ -171,7 +171,7 @@ function runDownstreamTests(key, upstreamPackages, downstreamTreeNode, successLo
171171

172172
const name = downstreamTreeNode.installDir;
173173

174-
foldEnd = foldStart(` ===> Running downstream tests: '${name}' <===`)
174+
foldEnd = foldStart(`Running downstream tests: '${name}'`)
175175

176176
console.log(` ===> '${name}': prepping tests <===`);
177177
process.chdir(downstreamTreeNode.installDir);
@@ -199,7 +199,7 @@ function runDownstreamTests(key, upstreamPackages, downstreamTreeNode, successLo
199199
const thisPkg = JSON.parse(fs.readFileSync('package.json')).name;
200200
const upstreams = upstreamPackages.concat(thisPkg);
201201

202-
foldEnd = foldStart(` ===> Local Yalc Publish: ${process.cwd()} <===`);
202+
foldEnd = foldStart(`Local Yalc Publish: ${process.cwd().replace(/.*\//, '')}`);
203203
localPublish(process.cwd());
204204
foldEnd();
205205

@@ -212,17 +212,17 @@ function runDownstreamTests(key, upstreamPackages, downstreamTreeNode, successLo
212212
console.log(` ===> Creating .downstream_cache working directory <===`);
213213
makeDownstreamCache();
214214

215-
foldEnd = foldStart(` ===> Publishing ${pkgjson.name} to yalc registry <===`);
215+
foldEnd = foldStart(`Publishing ${pkgjson.name} to yalc registry`);
216216
localPublish();
217217
foldEnd();
218218

219-
foldEnd = foldStart(` ===> Fetching downstream projects <===`);
219+
foldEnd = foldStart(`Fetching downstream projects`);
220220
const tree = { children: {} };
221221
fetchDownstreamProjects(projects, "", tree.children);
222222
foldEnd();
223223

224224
if (yargs.argv.workspace) {
225-
foldEnd = foldStart(` ===> Installing downstream dependencies <===`);
225+
foldEnd = foldStart(`Installing downstream dependencies`);
226226
const downstreamDirs = getDownstreamInstallDirs(tree);
227227
installWorkspaceDependencies(downstreamDirs);
228228
foldEnd();

0 commit comments

Comments
 (0)