untracked 1.4.15 → 1.4.17

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.
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # untracked
2
2
 
3
3
  ![Last version](https://img.shields.io/github/tag/Kikobeats/untracked.svg?style=flat-square)
4
- [![Build Status](https://img.shields.io/travis/Kikobeats/untracked/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/untracked)
5
4
  [![NPM Status](https://img.shields.io/npm/dm/untracked.svg?style=flat-square)](https://www.npmjs.org/package/untracked)
6
5
 
7
6
  <div align="center">
@@ -25,30 +24,6 @@ npx untracked
25
24
 
26
25
  The files to ignore will be detected automagically ✨.
27
26
 
28
- ### Using with Up
29
-
30
- You need to write the output as [`.upignore`](https://up.docs.apex.sh/#configuration.ignoring_files).
31
-
32
- For doing that you can run the command directly
33
-
34
- ```
35
- npx untracked > .upignore
36
- ```
37
-
38
- Also, you can declare it as build [hook](https://up.docs.apex.sh/#configuration.hook_scripts) in your `up.json`:
39
-
40
- ```json
41
- {
42
- "hooks": {
43
- "build": [
44
- "npx untracked > .upignore"
45
- ],
46
- "clean": [
47
- "rm -f .upignore"
48
- ]
49
- }
50
- ```
51
-
52
27
  ### Using with Heroku
53
28
 
54
29
  You need to write the output as [`.slugignore`](https://devcenter.heroku.com/articles/slug-compiler#ignoring-files-with-slugignore).
@@ -69,12 +44,12 @@ Also, you can declare it as [`heroku-prebuild`](https://devcenter.heroku.com/art
69
44
  }
70
45
  ```
71
46
 
72
- ### Using with ZEIT Now
47
+ ### Using with Vercel
73
48
 
74
- Just you need to write the output at [`.nowignore`](https://zeit.co/guides/prevent-uploading-sourcepaths-with-nowignore) file.
49
+ Just you need to write the output at [`.vercelignore`](https://vercel.com/docs/concepts/deployments/vercel-ignore) file.
75
50
 
76
51
  ```
77
- npx untracked > .nowignore
52
+ npx untracked > .vercelignore
78
53
  ```
79
54
 
80
55
  ### Using with Yarn
package/bin/index.js CHANGED
@@ -3,17 +3,26 @@
3
3
  'use strict'
4
4
 
5
5
  const path = require('path')
6
+ const mri = require('mri')
6
7
 
7
8
  const pkg = require('../package.json')
8
9
  const untracked = require('..')
9
10
 
10
11
  require('update-notifier')({ pkg }).notify()
11
12
 
12
- const { flags: opts } = require('meow')({
13
- pkg,
14
- help: require('fs').readFileSync(path.join(__dirname, 'help.txt'), 'utf8')
13
+ const argv = mri(process.argv.slice(2), {
14
+ alias: {
15
+ help: 'h'
16
+ }
15
17
  })
16
- ;(async () => {
17
- const output = await untracked(opts)
18
- console.log(output)
19
- })()
18
+
19
+ if (argv.help) {
20
+ console.log(
21
+ require('fs').readFileSync(path.join(__dirname, 'help.txt'), 'utf8')
22
+ )
23
+ process.exit(0)
24
+ }
25
+
26
+ untracked(argv)
27
+ .then(output => console.log(output))
28
+ .catch(error => console.error(error) || process.exit(1))
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "untracked",
3
3
  "description": "Universal way for ignoring unnecessary common files to fit your bundle",
4
- "homepage": "https://nicedoc.io/Kikobeats/untracked",
5
- "version": "1.4.15",
4
+ "homepage": "https://github.com/Kikobeats/untracked",
5
+ "version": "1.4.17",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "untracked": "bin/index.js"
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "joycon": "~3.1.1",
39
39
  "lodash": "~4.17.21",
40
- "meow": "~9.0.0",
40
+ "mri": "~1.2.0",
41
41
  "update-notifier": "~5.1.0"
42
42
  },
43
43
  "devDependencies": {
@@ -64,11 +64,11 @@
64
64
  ],
65
65
  "scripts": {
66
66
  "clean": "rm -rf node_modules",
67
- "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
67
+ "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
68
68
  "coveralls": "nyc report --reporter=text-lcov | coveralls",
69
69
  "lint": "standard-markdown README.md && standard",
70
70
  "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
71
- "prerelease": "npm run update:check && npm run contributors",
71
+ "prerelease": "npm run update:check",
72
72
  "pretest": "npm run lint",
73
73
  "pretty": "prettier-standard index.js {core,test,bin}/**/*.js --single-quote",
74
74
  "release": "standard-version -a",
@@ -16,7 +16,9 @@ const flattenDeps = (pkg, acc) => {
16
16
  const readProductionDeps = () => {
17
17
  let output
18
18
  try {
19
- output = execSync('npm ls --prod --all --json 2>/dev/null')
19
+ output = execSync('npm ls --prod --all --json 2> /dev/null', {
20
+ maxBuffer: 1024 * 1024 * 200
21
+ })
20
22
  } catch (err) {
21
23
  output = err.stdout
22
24
  }
package/src/index.js CHANGED
@@ -15,13 +15,11 @@ module.exports = async opts => {
15
15
  .filter(removeBlacklistedDeps)
16
16
  .map(includeNamespaces)
17
17
 
18
- const output = []
19
- .concat(
20
- blacklist,
21
- whitelist.map(doNotIgnore),
22
- productionDeps.map(doNotIgnore)
23
- )
24
- .join('\n')
18
+ const output = [].concat(
19
+ blacklist,
20
+ whitelist.map(doNotIgnore),
21
+ productionDeps.map(doNotIgnore)
22
+ )
25
23
 
26
- return output
24
+ return [...new Set(output)].join('\n')
27
25
  }