Skip to content

Commit 599b297

Browse files
committed
refactor: no deps and reformat with dprint
1 parent b8b0afa commit 599b297

File tree

8 files changed

+1514
-2507
lines changed

8 files changed

+1514
-2507
lines changed

dprint.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"incremental": true,
3+
"typescript": {
4+
},
5+
"json": {
6+
},
7+
"includes": ["**/*.{ts,tsx,js,jsx,cjs,mjs,json}"],
8+
"excludes": [
9+
"**/node_modules",
10+
"**/*-lock.json"
11+
],
12+
"plugins": [
13+
"https://plugins.dprint.dev/typescript-0.62.2.wasm",
14+
"https://plugins.dprint.dev/json-0.14.1.wasm"
15+
]
16+
}

package.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
{
22
"name": "react-native-cli-bump-version",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"main": "src/index.ts",
55
"types": "lib/index.d.ts",
66
"license": "MIT",
77
"scripts": {
8+
"fmt": "dprint fmt",
89
"test": "yarn build && jest",
910
"build": "tsc",
1011
"prepare": "rm -rf ./lib/* && yarn test"
1112
},
12-
"dependencies": {
13-
"chalk": "3.0.0",
14-
"ramda": "0.27.0"
15-
},
1613
"devDependencies": {
17-
"@types/node": "^13.9.1",
18-
"@types/ramda": "^0.27.0",
19-
"jest": "^26.2.2",
20-
"ts-node": "8.6.2",
21-
"typescript": "3.8.3"
14+
"@types/node": "^17.0.14",
15+
"dprint": "^0.22.0",
16+
"jest": "^27.4.7",
17+
"ts-node": "^10.4.0",
18+
"typescript": "^4.5.5"
2219
}
2320
}

react-native.config.js

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
const { versioner } = require('./lib/index')
2-
const path = require('path')
1+
const { versioner } = require("./lib/index");
2+
const path = require("path");
33

44
module.exports = {
55
commands: [{
6-
name: 'bump-version',
6+
name: "bump-version",
77
func: (_, config, args) => {
8-
if (args.skipCodeFor === 'all' && args.skipSemverFor === 'all') {
8+
if (args.skipCodeFor === "all" && args.skipSemverFor === "all") {
99
// https://i.kym-cdn.com/photos/images/newsfeed/001/240/075/90f.png
10-
console.log('My work here is done.')
11-
return
10+
console.log("My work here is done.");
11+
return;
1212
}
1313

1414
const appGradlePath = path.join(
1515
config.project.android.sourceDir,
1616
config.project.android.appName,
17-
'build.gradle'
18-
)
17+
"build.gradle",
18+
);
1919

2020
versioner({
2121
root: config.root,
@@ -24,30 +24,30 @@ module.exports = {
2424
type: args.type,
2525
semver: args.semver,
2626
skipCodeFor: args.skipCodeFor
27-
? args.skipCodeFor.split(' ')
27+
? args.skipCodeFor.split(" ")
2828
: [],
2929
skipSemVerFor: args.skipSemverFor
30-
? args.skipSemverFor.split(' ')
31-
: []
32-
})
30+
? args.skipSemverFor.split(" ")
31+
: [],
32+
});
3333
},
3434
options: [
3535
{
36-
name: '--type [major|minor|patch]',
37-
description: 'SemVer release type, optional if --skip-semver-for all is passed'
36+
name: "--type [major|minor|patch]",
37+
description: "SemVer release type, optional if --skip-semver-for all is passed",
3838
},
3939
{
40-
name: '--semver [String]',
41-
description: 'Pass release version if known. Overwrites calculated SemVer. Optional.'
40+
name: "--semver [String]",
41+
description: "Pass release version if known. Overwrites calculated SemVer. Optional.",
4242
},
4343
{
44-
name: '--skip-semver-for [android|ios|all]',
45-
description: 'Skips bump SemVer for specified platform'
44+
name: "--skip-semver-for [android|ios|all]",
45+
description: "Skips bump SemVer for specified platform",
4646
},
4747
{
48-
name: '--skip-code-for [android|ios|all]',
49-
description: 'Skips bump version codes for specified platform'
50-
}
51-
]
52-
}]
53-
}
48+
name: "--skip-code-for [android|ios|all]",
49+
description: "Skips bump version codes for specified platform",
50+
},
51+
],
52+
}],
53+
};

0 commit comments

Comments
 (0)