untracked 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +8 -14
  2. package/src/load-config.js +13 -2
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "untracked",
3
3
  "description": "Universal way for ignoring unnecessary common files to fit your bundle",
4
4
  "homepage": "https://nicedoc.io/Kikobeats/untracked",
5
- "version": "1.4.6",
5
+ "version": "1.4.7",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "untracked": "bin/index.js"
@@ -35,7 +35,7 @@
35
35
  "webpack"
36
36
  ],
37
37
  "dependencies": {
38
- "cosmiconfig": "~7.0.0",
38
+ "joycon": "~3.1.1",
39
39
  "lodash": "~4.17.21",
40
40
  "meow": "~9.0.0",
41
41
  "update-notifier": "~5.1.0"
@@ -47,7 +47,7 @@
47
47
  "conventional-github-releaser": "latest",
48
48
  "finepack": "latest",
49
49
  "git-authors-cli": "latest",
50
- "lint-staged": "latest",
50
+ "nano-staged": "latest",
51
51
  "npm-check-updates": "latest",
52
52
  "prettier-standard": "latest",
53
53
  "simple-git-hooks": "latest",
@@ -85,25 +85,19 @@
85
85
  "@commitlint/config-conventional"
86
86
  ]
87
87
  },
88
- "husky": {
89
- "hooks": {
90
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
91
- "pre-commit": "lint-staged"
92
- }
93
- },
94
- "lint-staged": {
95
- "package.json": [
96
- "finepack"
97
- ],
88
+ "nano-staged": {
98
89
  "*.js,!*.min.js,": [
99
90
  "prettier-standard"
100
91
  ],
101
92
  "*.md": [
102
93
  "standard-markdown"
94
+ ],
95
+ "package.json": [
96
+ "finepack"
103
97
  ]
104
98
  },
105
99
  "simple-git-hooks": {
106
100
  "commit-msg": "npx commitlint --edit",
107
- "pre-commit": "npx lint-staged"
101
+ "pre-commit": "npx nano-staged"
108
102
  }
109
103
  }
@@ -1,7 +1,18 @@
1
1
  'use strict'
2
2
 
3
- const config = require('cosmiconfig').cosmiconfig('untracked')
4
3
  const { get } = require('lodash')
4
+ const JoyCon = require('joycon')
5
+
6
+ const joycon = new JoyCon({
7
+ packageKey: 'untracked',
8
+ files: [
9
+ 'package.json',
10
+ '.untrackedrc',
11
+ '.untrackedrc.json',
12
+ '.untrackedrc.js',
13
+ 'untracked.config.js'
14
+ ]
15
+ })
5
16
 
6
17
  const DEFAULT = {
7
18
  blacklist: require('./default/blacklist')
@@ -14,7 +25,7 @@ const createCollection = (configFile, propName) => {
14
25
  }
15
26
 
16
27
  module.exports = async ({ cwd = process.cwd() }) => {
17
- const configFile = await config.search(cwd)
28
+ const { data: configFile } = await joycon.load()
18
29
 
19
30
  return {
20
31
  whitelist: createCollection(configFile, 'whitelist'),