@jayrdeaton/scripts 1.0.0 → 1.1.0
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 +121 -0
- package/package.json +15 -7
- package/src/commands/base64.mjs +45 -0
- package/src/commands/binary.mjs +38 -0
- package/src/commands/bump-ota.mjs +10 -8
- package/src/commands/check-domains.mjs +102 -0
- package/src/commands/clean-builds.mjs +129 -0
- package/src/commands/clean-junk.mjs +123 -0
- package/src/commands/code-count.mjs +11 -16
- package/src/commands/find-dep.mjs +95 -0
- package/src/commands/focus.mjs +11 -0
- package/src/commands/folder-sizes.mjs +10 -5
- package/src/commands/new-expo-project.mjs +77 -0
- package/src/commands/npm-downloads.mjs +95 -0
- package/src/commands/npm-namer.mjs +75 -0
- package/src/commands/rename-season.mjs +4 -5
- package/src/commands/repo-status.mjs +21 -14
- package/src/commands/update-boilerplate.mjs +52 -0
- package/src/commands/update-deps.mjs +10 -8
|
@@ -2,11 +2,10 @@ import { execSync } from 'node:child_process'
|
|
|
2
2
|
import { readFileSync } from 'node:fs'
|
|
3
3
|
import { resolve } from 'node:path'
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { command as createCommand } from 'termkit'
|
|
5
|
+
import { Color, command as createCommand, log } from 'termkit'
|
|
7
6
|
|
|
8
7
|
function exec(cmd) {
|
|
9
|
-
console.log(
|
|
8
|
+
console.log(Color.faint(`$ ${cmd}`))
|
|
10
9
|
execSync(cmd, { stdio: 'inherit' })
|
|
11
10
|
}
|
|
12
11
|
|
|
@@ -26,7 +25,7 @@ export const command = createCommand('update-deps')
|
|
|
26
25
|
try {
|
|
27
26
|
pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
28
27
|
} catch {
|
|
29
|
-
|
|
28
|
+
log.fail('No package.json found in current directory.')
|
|
30
29
|
process.exit(1)
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -35,21 +34,24 @@ export const command = createCommand('update-deps')
|
|
|
35
34
|
const legacyFlag = options.legacy ? ' --legacy-peer-deps' : ''
|
|
36
35
|
|
|
37
36
|
if (!options.dev && prodDeps.length) {
|
|
38
|
-
|
|
37
|
+
log.info('Updating dependencies...')
|
|
39
38
|
exec(`npm install${legacyFlag} ${prodDeps.join(' ')}`)
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
if (!options.prod && devDeps.length) {
|
|
43
|
-
|
|
42
|
+
log.info('Updating devDependencies...')
|
|
44
43
|
exec(`npm install --save-dev${legacyFlag} ${devDeps.join(' ')}`)
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
const hasExpo = pkg.dependencies?.expo !== undefined || pkg.devDependencies?.expo !== undefined
|
|
48
47
|
|
|
49
48
|
if (hasExpo) {
|
|
50
|
-
|
|
49
|
+
log.info('Fixing Expo managed versions...')
|
|
51
50
|
exec(`npx expo install --fix${options.legacy ? ' -- --legacy-peer-deps' : ''}`)
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
log.info('Auditing and fixing vulnerabilities...')
|
|
54
|
+
exec('npm audit --fix')
|
|
55
|
+
|
|
56
|
+
log.succeed('Done.')
|
|
55
57
|
})
|