[ci] yarn format
This commit is contained in:
parent
b1364afbae
commit
cb3ff36105
3 changed files with 17 additions and 20 deletions
|
@ -4,10 +4,7 @@ function verboseLogging() {
|
|||
return process.argv.includes('--verbose');
|
||||
}
|
||||
|
||||
const onceMessages = [
|
||||
'Ready!',
|
||||
'watching for file changes'
|
||||
].map(str => new RegExp(`\\[snowpack\\](.*?)${str}`));
|
||||
const onceMessages = ['Ready!', 'watching for file changes'].map((str) => new RegExp(`\\[snowpack\\](.*?)${str}`));
|
||||
|
||||
export function configureSnowpackLogger(logger: typeof snowpackLogger) {
|
||||
const messageCache = new Set<string>();
|
||||
|
@ -16,7 +13,7 @@ export function configureSnowpackLogger(logger: typeof snowpackLogger) {
|
|||
logger.level = 'debug';
|
||||
}
|
||||
|
||||
logger.on('info', message => {
|
||||
logger.on('info', (message) => {
|
||||
// Cache messages that should only be shown once.
|
||||
// This is due to having 2 snowpack instances. Once that is removed we can
|
||||
// get rid of this workaround.
|
||||
|
@ -24,7 +21,7 @@ export function configureSnowpackLogger(logger: typeof snowpackLogger) {
|
|||
return;
|
||||
}
|
||||
|
||||
const shouldBeCached = onceMessages.some(exp => exp.test(message));
|
||||
const shouldBeCached = onceMessages.some((exp) => exp.test(message));
|
||||
if (shouldBeCached) {
|
||||
messageCache.add(message);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ if(!isWindows()) {
|
|||
const exp = new RegExp(message, 'g');
|
||||
let count = 0;
|
||||
let res;
|
||||
while(res = exp.exec(stdout)) {
|
||||
while ((res = exp.exec(stdout))) {
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
|
@ -21,7 +21,7 @@ if(!isWindows()) {
|
|||
const root = new URL('./fixtures/astro/basic/', import.meta.url);
|
||||
const timers = {};
|
||||
let runError = null;
|
||||
SnowpackLogging.before(async context => {
|
||||
SnowpackLogging.before(async (context) => {
|
||||
await clearCache();
|
||||
|
||||
let importantMessages = 0;
|
||||
|
@ -70,7 +70,7 @@ if(!isWindows()) {
|
|||
|
||||
SnowpackLogging('Logs [waiting for file changes] once', ({ stdout }) => {
|
||||
assert.equal(numberOfEntries(stdout, 'watching for file changes'), 1);
|
||||
})
|
||||
});
|
||||
|
||||
SnowpackLogging.after.each(({ __test__ }) => {
|
||||
clearTimeout(timers[__test__]);
|
||||
|
|
Loading…
Add table
Reference in a new issue