Skip to content

Commit a530981

Browse files
committed
style: lift core/library to own modules
1 parent fa80b1b commit a530981

File tree

115 files changed

+877
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+877
-197
lines changed

@commitlint/cli/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
"babel-polyfill": "6.26.0",
7474
"chalk": "2.3.0",
7575
"get-stdin": "5.0.1",
76-
"lodash": "4.17.4",
76+
"lodash.merge": "4.6.0",
77+
"lodash.pick": "4.4.0",
7778
"meow": "3.7.0"
7879
}
7980
}

@commitlint/cli/src/cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ require('babel-polyfill'); // eslint-disable-line import/no-unassigned-import
44
const core = require('@commitlint/core');
55
const chalk = require('chalk');
66
const meow = require('meow');
7-
const {merge, pick} = require('lodash');
7+
const merge = require('lodash.merge');
8+
const pick = require('lodash.pick');
89
const stdin = require('get-stdin');
910

1011
const pkg = require('../package');

@commitlint/cli/src/cli.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import {fix, git} from '@commitlint/test';
33
import test from 'ava';
44
import execa from 'execa';
5-
import {merge} from 'lodash';
5+
import merge from 'lodash.merge';
66
import * as sander from 'sander';
77
import stream from 'string-to-stream';
88

@commitlint/config-patternplate/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
const path = require('path');
22
const globby = require('globby');
3-
const merge = require('lodash').merge;
3+
const merge = require('lodash.merge');
44

55
function pathToId(root, filePath) {
66
const relativePath = path.relative(root, filePath);
7-
return path.dirname(relativePath).split(path.sep).join('/');
7+
return path
8+
.dirname(relativePath)
9+
.split(path.sep)
10+
.join('/');
811
}
912

1013
function getPatternIDs() {

@commitlint/config-patternplate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"dependencies": {
3030
"@commitlint/config-angular": "^5.1.1",
3131
"globby": "4.1.0",
32-
"lodash": "4.17.4"
32+
"lodash.merge": "4.6.0"
3333
},
3434
"devDependencies": {
3535
"@commitlint/utils": "^5.1.1",

@commitlint/core/package.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,26 @@
6767
"cross-env": "5.1.1",
6868
"execa": "0.8.0",
6969
"globby": "6.1.0",
70+
"lodash.includes": "4.3.0",
7071
"rimraf": "2.6.1",
7172
"xo": "0.18.2"
7273
},
7374
"dependencies": {
75+
"@commitlint/execute-rule": "5.2.6",
76+
"@commitlint/is-ignored": "5.2.6",
7477
"@commitlint/parse": "5.2.6",
78+
"@commitlint/resolve-extends": "5.2.6",
79+
"@commitlint/rules": "5.2.6",
80+
"@commitlint/top-level": "5.2.6",
7581
"@marionebl/sander": "^0.6.0",
7682
"babel-runtime": "^6.23.0",
7783
"chalk": "^2.0.1",
7884
"cosmiconfig": "^3.0.1",
79-
"find-up": "^2.1.0",
8085
"git-raw-commits": "^1.3.0",
81-
"lodash": "^4.17.4",
82-
"require-uncached": "^1.0.3",
83-
"resolve-from": "^4.0.0",
84-
"resolve-global": "^0.1.0",
85-
"semver": "^5.3.0"
86+
"lodash.merge": "4.6.0",
87+
"lodash.mergewith": "4.6.0",
88+
"lodash.pick": "4.4.0",
89+
"lodash.topairs": "4.3.0",
90+
"resolve-from": "4.0.0"
8691
}
8792
}

@commitlint/core/src/format.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava';
22
import chalk from 'chalk';
3-
import {includes} from 'lodash';
3+
import includes from 'lodash.includes';
44
import format from './format';
55

66
const ok = chalk.bold(`${chalk.green('✔')} found 0 problems, 0 warnings`);

@commitlint/core/src/lint.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import isIgnored from '@commitlint/is-ignored';
12
import parse from '@commitlint/parse';
2-
import {entries} from 'lodash';
3-
import isIgnored from './library/is-ignored';
4-
import implementations from './rules';
3+
import implementations from '@commitlint/rules';
4+
import entries from 'lodash.topairs';
55

66
export default async (message, rules = {}, opts = {}) => {
77
// Found a wildcard match, skip

@commitlint/core/src/load.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import path from 'path';
2+
import executeRule from '@commitlint/execute-rule';
3+
import resolveExtends from '@commitlint/resolve-extends';
24
import cosmiconfig from 'cosmiconfig';
3-
import {entries, merge, mergeWith, pick} from 'lodash';
5+
import entries from 'lodash.topairs';
6+
import merge from 'lodash.merge';
7+
import mergeWith from 'lodash.mergewith';
8+
import pick from 'lodash.pick';
49
import resolveFrom from 'resolve-from';
510

6-
import executeRule from './library/execute-rule';
7-
import resolveExtends from './library/resolve-extends';
8-
911
const w = (a, b) => (Array.isArray(b) ? b : undefined);
1012
const valid = input => pick(input, 'extends', 'rules', 'parserPreset');
1113

@commitlint/core/src/read.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import gitRawCommits from 'git-raw-commits';
33
import * as sander from '@marionebl/sander';
44

5-
import toplevel from './library/toplevel';
5+
import toplevel from '@commitlint/top-level';
66

77
export default getCommitMessages;
88

0 commit comments

Comments
 (0)