Skip to content

Commit

Permalink
build: update debug statement syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Jan 22, 2021
1 parent 12b4b58 commit 107b953
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
20 changes: 10 additions & 10 deletions .changelogrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const changelogTitle =
// ! These also have to be updated in build-test-deploy.yml and cleanup.yml
const SKIP_COMMANDS = '[skip ci], [ci skip], [skip cd], [cd skip]'.split(', ');

debug('SKIP_COMMANDS=', SKIP_COMMANDS);
debug('SKIP_COMMANDS:', SKIP_COMMANDS);

sjx.config.silent = true;

Expand All @@ -49,8 +49,8 @@ const allReleaseTriggerCommitTypes = [
extraReleaseTriggerCommitTypes
].flat();

debug('extra types that trigger releases = %O', extraReleaseTriggerCommitTypes);
debug('all types that trigger releases = %O', allReleaseTriggerCommitTypes);
debug('extra types that trigger releases: %O', extraReleaseTriggerCommitTypes);
debug('all types that trigger releases: %O', allReleaseTriggerCommitTypes);

// ? Releases made before this repo adopted semantic-release. They will be
// ? collected together under a single header
Expand All @@ -74,17 +74,17 @@ module.exports = {
(shouldGenerate &&
!!semver.valid(commit.version) &&
!semver.prerelease(commit.version));
debug(`::generateOn shouldGenerate=${shouldGenerate} decision=${decision}`);
debug(`::generateOn shouldGenerate:${shouldGenerate} decision:${decision}`);
shouldGenerate = true;
return decision;
},
transform: (commit, context) => {
const version = commit.version || null;
const firstRelease = version === context.gitSemverTags?.slice(-1)[0].slice(1);

debug('::transform encountered commit = %O', commit);
debug(`::transform commit version = ${version}`);
debug(`::transform commit firstRelease = ${firstRelease}`);
debug('::transform encountered commit: %O', commit);
debug(`::transform commit version: ${version}`);
debug(`::transform commit firstRelease: ${firstRelease}`);

if (commit.revert) {
debug('::transform coercing to type "revert"');
Expand Down Expand Up @@ -115,7 +115,7 @@ module.exports = {

commit = transform(commit, context);

debug('::transform angular transformed commit = %O', commit);
debug('::transform angular transformed commit: %O', commit);

if (commit) {
if (fakeFix) {
Expand Down Expand Up @@ -203,10 +203,10 @@ module.exports = {
};
}

debug('::transform final commit = %O', commit);
debug('::transform final commit: %O', commit);
return commit;
}
}
};

debug('exports = %O', module.exports);
debug('exports: %O', module.exports);
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ module.exports = {
}
};

debug('exports = %O', module.exports);
debug('exports: %O', module.exports);
12 changes: 6 additions & 6 deletions env-expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = {
let normalizedRule;
const makeErrorMessage = (reason) => `missing dep: ${reason}`;

debug('::normalize (not normalized) = %O', rule);
debug('::normalize (not normalized): %O', rule);

if (typeof rule == 'string' || rule instanceof RegExp) {
if (typeof rule == 'string') {
Expand Down Expand Up @@ -156,15 +156,15 @@ module.exports = {
)
};
} else {
debug('::normalize BAD RULE ENCOUNTERED = %O', rule);
debug('::normalize BAD RULE ENCOUNTERED: %O', rule);
throw new IllegalEnvironmentError(
`bad rule encountered${
fromPkg ? ' in ./package.json "env-expect"' : ''
}: ${JSON.stringify(rule, undefined, 2)}`
);
}

debug('::normalize (normalized) = %O', normalizedRule);
debug('::normalize (normalized): %O', normalizedRule);
return normalizedRule;
};

Expand All @@ -177,8 +177,8 @@ module.exports = {
} catch (ignored) {}
}

debug('rules = %O', rules);
debug('errorMessage = %O', errorMessage);
debug('rules: %O', rules);
debug('errorMessage: %O', errorMessage);

if (typeof rules == 'undefined') return [];

Expand Down Expand Up @@ -251,7 +251,7 @@ module.exports = {
!errorMessage ? 'environment verification failed' : errorMessage
);

debug('violated rules = %O', violations);
debug('violated rules: %O', violations);
return violations;
}
};
Expand Down
6 changes: 3 additions & 3 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const debug = require('debug')(
const SHOULD_UPDATE_CHANGELOG = process.env.SHOULD_UPDATE_CHANGELOG === 'true';
const SHOULD_DEPLOY = process.env.SHOULD_DEPLOY === 'true';

debug(`SHOULD_UPDATE_CHANGELOG=${SHOULD_UPDATE_CHANGELOG}`);
debug(`SHOULD_DEPLOY=${SHOULD_DEPLOY}`);
debug(`SHOULD_UPDATE_CHANGELOG:${SHOULD_UPDATE_CHANGELOG}`);
debug(`SHOULD_DEPLOY:${SHOULD_DEPLOY}`);

const {
changelogTitle,
Expand Down Expand Up @@ -94,4 +94,4 @@ module.exports = {
]
};

debug('exports = %O', module.exports);
debug('exports: %O', module.exports);
6 changes: 3 additions & 3 deletions spellcheck-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const keys = (obj) => Object.keys(obj).map(splitOutWords);
const lastCommitMsg = (await read('./.git/COMMIT_EDITMSG')).toString('utf-8');
const homeDir = require('os').homedir();

debug(`lastCommitMsg = ${lastCommitMsg}`);
debug(`homeDir = ${homeDir}`);
debug(`lastCommitMsg: ${lastCommitMsg}`);
debug(`homeDir: ${homeDir}`);

const ignoreWords = Array.from(
new Set(
Expand Down Expand Up @@ -90,7 +90,7 @@ const keys = (obj) => Object.keys(obj).map(splitOutWords);
)
);

debug('typos = %O', typos);
debug('typos: %O', typos);

if (typos.length) {
console.warn('WARNING: there may be misspelled words in your commit message!');
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const nodeExternals = require('webpack-node-externals');
const debug = require('debug')(`${require('./package.json').name}:webpack-config`);

const dotenv = populateEnv();
debug('saw dotenv result => %O', dotenv);
debug('saw dotenv result: %O', dotenv);
const env = dotenv.parsed || {};
debug('got env => %O', env);
debug('saw env: %O', env);
verifyEnvironment();

const plugins = [
Expand Down Expand Up @@ -52,4 +52,4 @@ module.exports = {
plugins
};

debug('exports = %O', module.exports);
debug('exports: %O', module.exports);

0 comments on commit 107b953

Please sign in to comment.