Skip to content

Commit

Permalink
refactor: Simplify file tree
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Nov 22, 2017
1 parent de88ab7 commit 680ed44
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 18 deletions.
12 changes: 6 additions & 6 deletions lib/index.js → index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const {callbackify} = require('util');
const parser = require('conventional-commits-parser').sync;
const debug = require('debug')('semantic-release:commit-analyzer');
const loadParserConfig = require('./load/parser-config');
const loadReleaseRules = require('./load/release-rules');
const analyzeCommit = require('./analyze-commit');
const compareReleaseTypes = require('./compare-release-types');
const RELEASE_TYPES = require('./default/release-types');
const DEFAULT_RELEASE_RULES = require('./default/release-rules');
const loadParserConfig = require('./lib/load-parser-config');
const loadReleaseRules = require('./lib/load-release-rules');
const analyzeCommit = require('./lib/analyze-commit');
const compareReleaseTypes = require('./lib/compare-release-types');
const RELEASE_TYPES = require('./lib/default-release-types');
const DEFAULT_RELEASE_RULES = require('./lib/default-release-rules');

/**
* Determine the type of release to create based on a list of commits.
Expand Down
2 changes: 1 addition & 1 deletion lib/analyze-commit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const {isMatchWith, isRegExp, omit} = require('lodash');
const debug = require('debug')('semantic-release:commit-analyzer');
const RELEASE_TYPES = require('./default/release-types');
const RELEASE_TYPES = require('./default-release-types');
const compareReleaseTypes = require('./compare-release-types');

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/compare-release-types.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const RELEASE_TYPES = require('./default/release-types');
const RELEASE_TYPES = require('./default-release-types');

/**
* Test if a realease type is of higher level than a given one.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/load/release-rules.js → lib/load-release-rules.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const importFrom = require('import-from');
const RELEASE_TYPES = require('../default/release-types');
const RELEASE_TYPES = require('./default-release-types');

/**
* Load and validate the `releaseRules` rules.
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"node": ">=4"
},
"files": [
"lib"
"lib",
"index.js"
],
"homepage": "https://github.com/semantic-release/commit-analyzer#readme",
"keywords": [
Expand All @@ -59,10 +60,11 @@
"semantic-release"
],
"license": "MIT",
"main": "lib/index.js",
"main": "index.js",
"nyc": {
"include": [
"lib/**/*.js"
"lib/**/*.js",
"index.js"
],
"reporter": [
"json",
Expand All @@ -82,7 +84,7 @@
},
"release": {
"analyzeCommits": {
"path": "./lib/index.js"
"path": "./index.js"
}
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion test/analyze-commit.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import analyzeCommit from './../lib/analyze-commit';
import analyzeCommit from '../lib/analyze-commit';

test('Match breaking change', t => {
const commit = {
Expand Down
2 changes: 1 addition & 1 deletion test/compare-release-types.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import compareReleaseTypes from './../lib/compare-release-types';
import compareReleaseTypes from '../lib/compare-release-types';

test('Compares release types', t => {
t.true(compareReleaseTypes('patch', 'minor'));
Expand Down
2 changes: 1 addition & 1 deletion test/integration.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {promisify} from 'util';
import test from 'ava';
import {stub} from 'sinon';
import commitAnalyzer from '../lib/index';
import commitAnalyzer from '..';

test.beforeEach(t => {
const log = stub();
Expand Down
2 changes: 1 addition & 1 deletion test/load-parser-config.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import loadParserConfig from './../lib/load/parser-config';
import loadParserConfig from './../lib/load-parser-config';

/**
* AVA macro to verify that `loadParserConfig` return a parserOpts object.
Expand Down
2 changes: 1 addition & 1 deletion test/load-release-rules.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import loadReleaseRules from './../lib/load/release-rules';
import loadReleaseRules from './../lib/load-release-rules';
import testReleaseRules from './fixtures/release-rules';

test('Accept a "releaseRules" option', t => {
Expand Down

0 comments on commit 680ed44

Please sign in to comment.