Skip to content

Commit

Permalink
refactor: no deps and reformat with dprint
Browse files Browse the repository at this point in the history
  • Loading branch information
Grohden committed Feb 4, 2022
1 parent b8b0afa commit 599b297
Show file tree
Hide file tree
Showing 8 changed files with 1,514 additions and 2,507 deletions.
16 changes: 16 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"incremental": true,
"typescript": {
},
"json": {
},
"includes": ["**/*.{ts,tsx,js,jsx,cjs,mjs,json}"],
"excludes": [
"**/node_modules",
"**/*-lock.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.62.2.wasm",
"https://plugins.dprint.dev/json-0.14.1.wasm"
]
}
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"name": "react-native-cli-bump-version",
"version": "1.3.0",
"version": "1.4.0",
"main": "src/index.ts",
"types": "lib/index.d.ts",
"license": "MIT",
"scripts": {
"fmt": "dprint fmt",
"test": "yarn build && jest",
"build": "tsc",
"prepare": "rm -rf ./lib/* && yarn test"
},
"dependencies": {
"chalk": "3.0.0",
"ramda": "0.27.0"
},
"devDependencies": {
"@types/node": "^13.9.1",
"@types/ramda": "^0.27.0",
"jest": "^26.2.2",
"ts-node": "8.6.2",
"typescript": "3.8.3"
"@types/node": "^17.0.14",
"dprint": "^0.22.0",
"jest": "^27.4.7",
"ts-node": "^10.4.0",
"typescript": "^4.5.5"
}
}
48 changes: 24 additions & 24 deletions react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const { versioner } = require('./lib/index')
const path = require('path')
const { versioner } = require("./lib/index");
const path = require("path");

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

const appGradlePath = path.join(
config.project.android.sourceDir,
config.project.android.appName,
'build.gradle'
)
"build.gradle",
);

versioner({
root: config.root,
Expand All @@ -24,30 +24,30 @@ module.exports = {
type: args.type,
semver: args.semver,
skipCodeFor: args.skipCodeFor
? args.skipCodeFor.split(' ')
? args.skipCodeFor.split(" ")
: [],
skipSemVerFor: args.skipSemverFor
? args.skipSemverFor.split(' ')
: []
})
? args.skipSemverFor.split(" ")
: [],
});
},
options: [
{
name: '--type [major|minor|patch]',
description: 'SemVer release type, optional if --skip-semver-for all is passed'
name: "--type [major|minor|patch]",
description: "SemVer release type, optional if --skip-semver-for all is passed",
},
{
name: '--semver [String]',
description: 'Pass release version if known. Overwrites calculated SemVer. Optional.'
name: "--semver [String]",
description: "Pass release version if known. Overwrites calculated SemVer. Optional.",
},
{
name: '--skip-semver-for [android|ios|all]',
description: 'Skips bump SemVer for specified platform'
name: "--skip-semver-for [android|ios|all]",
description: "Skips bump SemVer for specified platform",
},
{
name: '--skip-code-for [android|ios|all]',
description: 'Skips bump version codes for specified platform'
}
]
}]
}
name: "--skip-code-for [android|ios|all]",
description: "Skips bump version codes for specified platform",
},
],
}],
};
Loading

0 comments on commit 599b297

Please sign in to comment.