forked from Enveloppe/obsidian-enveloppe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
34,015 additions
and
11,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es2022": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jsonc/recommended-with-jsonc", | ||
"plugin:jsonc/recommended-with-json", | ||
|
||
], | ||
"parser": "@typescript-eslint/parser", | ||
overrides: [ | ||
{ | ||
files: ["*.json"], | ||
parser: "jsonc-eslint-parser" | ||
}, | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"windows" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"jsonc/sort-keys": [ | ||
"error", | ||
"asc", { | ||
"caseSensitive": false, | ||
"natural": false | ||
} | ||
], | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
}; | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es2022": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jsonc/recommended-with-jsonc", | ||
"plugin:jsonc/recommended-with-json", | ||
|
||
], | ||
"parser": "@typescript-eslint/parser", | ||
overrides: [ | ||
{ | ||
files: ["*.json"], | ||
parser: "jsonc-eslint-parser" | ||
}, | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"windows" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"jsonc/sort-keys": [ | ||
"error", | ||
"asc", { | ||
"caseSensitive": false, | ||
"natural": false | ||
} | ||
], | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', {targets: {node: 'current'}}], | ||
'@babel/preset-typescript' | ||
] | ||
}; | ||
module.exports = { | ||
presets: [ | ||
["@babel/preset-env", {targets: {node: "current"}}], | ||
"@babel/preset-typescript" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,122 +1,122 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const { Command, Option } = require("commander"); | ||
const { readFileSync, writeFileSync } = require("fs"); | ||
const commitAndTagVersion = require("standard-version"); | ||
const dedent = require("dedent"); | ||
const c = require("ansi-colors"); | ||
const program = new Command(); | ||
|
||
c.theme({ | ||
danger: c.red, | ||
dark: c.dim.gray, | ||
disabled: c.gray, | ||
em: c.italic, | ||
heading: c.bold.underline, | ||
info: c.cyan, | ||
muted: c.dim, | ||
primary: c.blue, | ||
strong: c.bold, | ||
success: c.green.bold, | ||
underline: c.underline, | ||
warning: c.yellow.underline, | ||
}); | ||
|
||
program | ||
.description("Bump version and create a new tag") | ||
.option("-b, --beta", "Pre-release version") | ||
.option("--dry-run", "Dry run") | ||
.addOption( | ||
new Option("-r, --release-as <size>", "release type version").choices([ | ||
"major", | ||
"minor", | ||
"patch", | ||
]) | ||
); | ||
|
||
program.parse(); | ||
const opt = program.opts(); | ||
|
||
const betaMsg = opt.beta ? c.em("- Pre-release\n\t") : ""; | ||
const dryRunMsg = opt.dryRun ? c.em("- Dry run\n\t") : ""; | ||
const releaseAsMsg = opt.releaseAs | ||
? c.em(`- Release as ${c.underline(opt.releaseAs)}`) | ||
: ""; | ||
|
||
const msg = dedent(` | ||
${c.heading("Options :")} | ||
${betaMsg}${dryRunMsg}${releaseAsMsg} | ||
`); | ||
|
||
console.log(msg); | ||
console.log(); | ||
|
||
if (opt.beta) { | ||
console.log(`${c.bold.green(">")} ${c.info.underline("Bumping beta version...")}`); | ||
console.log(); | ||
const bumpFiles = [ | ||
{ | ||
filename: "manifest-beta.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package-lock.json", | ||
type: "json", | ||
}, | ||
]; | ||
commitAndTagVersion({ | ||
infile: "CHANGELOG-beta.md", | ||
bumpFiles: bumpFiles, | ||
prerelease: "", | ||
dryRun: opt.dryRun, | ||
tagPrefix: "", | ||
}) | ||
.then(() => { | ||
console.log("Done"); | ||
}) | ||
.catch((err) => { | ||
console.error(err); | ||
}); | ||
} else { | ||
const versionBumped = opt.releaseAs | ||
? c.info("Release as " + c.underline(opt.releaseAs)) | ||
: c.info("Release"); | ||
console.log(`${c.bold.green(">")} ${c.underline(versionBumped)}`); | ||
console.log(); | ||
|
||
const bumpFiles = [ | ||
{ | ||
filename: "manifest-beta.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package-lock.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "manifest.json", | ||
type: "json", | ||
} | ||
]; | ||
|
||
|
||
commitAndTagVersion({ | ||
infile: "CHANGELOG.md", | ||
bumpFiles: bumpFiles, | ||
dryRun: opt.dryRun, | ||
tagPrefix: "", | ||
}) | ||
.then(() => { | ||
console.log("Done"); | ||
}) | ||
.catch((err) => { | ||
console.error(err); | ||
}); | ||
} | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const { Command, Option } = require("commander"); | ||
const { readFileSync, writeFileSync } = require("fs"); | ||
const commitAndTagVersion = require("standard-version"); | ||
const dedent = require("dedent"); | ||
const c = require("ansi-colors"); | ||
const program = new Command(); | ||
|
||
c.theme({ | ||
danger: c.red, | ||
dark: c.dim.gray, | ||
disabled: c.gray, | ||
em: c.italic, | ||
heading: c.bold.underline, | ||
info: c.cyan, | ||
muted: c.dim, | ||
primary: c.blue, | ||
strong: c.bold, | ||
success: c.green.bold, | ||
underline: c.underline, | ||
warning: c.yellow.underline, | ||
}); | ||
|
||
program | ||
.description("Bump version and create a new tag") | ||
.option("-b, --beta", "Pre-release version") | ||
.option("--dry-run", "Dry run") | ||
.addOption( | ||
new Option("-r, --release-as <size>", "release type version").choices([ | ||
"major", | ||
"minor", | ||
"patch", | ||
]) | ||
); | ||
|
||
program.parse(); | ||
const opt = program.opts(); | ||
|
||
const betaMsg = opt.beta ? c.em("- Pre-release\n\t") : ""; | ||
const dryRunMsg = opt.dryRun ? c.em("- Dry run\n\t") : ""; | ||
const releaseAsMsg = opt.releaseAs | ||
? c.em(`- Release as ${c.underline(opt.releaseAs)}`) | ||
: ""; | ||
|
||
const msg = dedent(` | ||
${c.heading("Options :")} | ||
${betaMsg}${dryRunMsg}${releaseAsMsg} | ||
`); | ||
|
||
console.log(msg); | ||
console.log(); | ||
|
||
if (opt.beta) { | ||
console.log(`${c.bold.green(">")} ${c.info.underline("Bumping beta version...")}`); | ||
console.log(); | ||
const bumpFiles = [ | ||
{ | ||
filename: "manifest-beta.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package-lock.json", | ||
type: "json", | ||
}, | ||
]; | ||
commitAndTagVersion({ | ||
infile: "CHANGELOG-beta.md", | ||
bumpFiles: bumpFiles, | ||
prerelease: "", | ||
dryRun: opt.dryRun, | ||
tagPrefix: "", | ||
}) | ||
.then(() => { | ||
console.log("Done"); | ||
}) | ||
.catch((err) => { | ||
console.error(err); | ||
}); | ||
} else { | ||
const versionBumped = opt.releaseAs | ||
? c.info("Release as " + c.underline(opt.releaseAs)) | ||
: c.info("Release"); | ||
console.log(`${c.bold.green(">")} ${c.underline(versionBumped)}`); | ||
console.log(); | ||
|
||
const bumpFiles = [ | ||
{ | ||
filename: "manifest-beta.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "package-lock.json", | ||
type: "json", | ||
}, | ||
{ | ||
filename: "manifest.json", | ||
type: "json", | ||
} | ||
]; | ||
|
||
|
||
commitAndTagVersion({ | ||
infile: "CHANGELOG.md", | ||
bumpFiles: bumpFiles, | ||
dryRun: opt.dryRun, | ||
tagPrefix: "", | ||
}) | ||
.then(() => { | ||
console.log("Done"); | ||
}) | ||
.catch((err) => { | ||
console.error(err); | ||
}); | ||
} |
Oops, something went wrong.