Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jun 13, 2020
1 parent d57e571 commit 696b2a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class Bumper extends Plugin {

if (isDryRun) return noop;

const isJson = ['application/json', 'json'].includes(type)
const isYaml = ['text/yaml', 'application/x-yaml', 'yaml', 'yml'].includes(type)
const isToml = (type === 'toml')
const isIni = ['application/textedit', 'ini'].includes(type)
const isJson = ['application/json', 'json'].includes(type);
const isYaml = ['text/yaml', 'application/x-yaml', 'yaml', 'yml'].includes(type);
const isToml = type === 'toml';
const isIni = ['application/textedit', 'ini'].includes(type);

if (isJson) {
const data = await readFile(file, 'utf8').catch(() => '{}');
Expand Down
5 changes: 2 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ mock({
'./foo.php': '/* comments\nversion: v1.0.0 */ <? echo <p>hello world</p>; ?>\n',
'./manifest.json': '{}',
'./dryrun.json': JSON.stringify({ version: '1.0.0' }),
'./foo.toml': `[tool.test]
version = "1.0.0"`,
'./foo.ini': `path.version=1.0.0\npath.name=fake`,
'./foo.toml': '[tool.test]\nversion = "1.0.0"',
'./foo.ini': `path.version=1.0.0\npath.name=fake`
});

const namespace = 'bumper';
Expand Down

0 comments on commit 696b2a1

Please sign in to comment.