From d87fcb7fd9371766a2aae8d81e6230a1063c3e70 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 17:31:18 +0000 Subject: [PATCH 1/3] Bump eslint-config-prettier from 6.15.0 to 8.0.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.15.0 to 8.0.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.15.0...v8.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 27 ++++++++++----------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index c1ccb3975..58af0c0bc 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "copy-template-dir": "^1.4.0", "endent": "^2.0.1", "eslint": "^7.6.0", - "eslint-config-prettier": "^6.11.0", + "eslint-config-prettier": "^8.0.0", "eslint-config-xo": "^0.33.1", "eslint-plugin-import": "^2.22.0", "eslint-plugin-jest": "^24.0.1", diff --git a/yarn.lock b/yarn.lock index 024b08fea..dfcad9b80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -64,10 +64,10 @@ integrity sha512-TYiuOxy5Pf9ORn94X/ujl7PY9opIh+l6NzRAV8EBLpIv3IC9gmEoev4wmmyP7Q33J0/nGjqxAaZcq/n2SZrYaQ== "@auto-it/bot-list@link:packages/bot-list": - version "10.16.5" + version "10.16.7" "@auto-it/core@link:packages/core": - version "10.16.5" + version "10.16.7" dependencies: "@auto-it/bot-list" "link:packages/bot-list" "@octokit/plugin-enterprise-compatibility" "^1.2.2" @@ -107,7 +107,7 @@ url-join "^4.0.0" "@auto-it/npm@link:plugins/npm": - version "10.16.5" + version "10.16.7" dependencies: "@auto-it/core" "link:packages/core" "@auto-it/package-json-utils" "link:packages/package-json-utils" @@ -124,13 +124,13 @@ user-home "^2.0.0" "@auto-it/package-json-utils@link:packages/package-json-utils": - version "10.16.5" + version "10.16.7" dependencies: parse-author "^2.0.0" parse-github-url "1.0.2" "@auto-it/released@link:plugins/released": - version "10.16.5" + version "10.16.7" dependencies: "@auto-it/bot-list" "link:packages/bot-list" "@auto-it/core" "link:packages/core" @@ -140,7 +140,7 @@ tslib "2.1.0" "@auto-it/slack@link:plugins/slack": - version "10.16.5" + version "10.16.7" dependencies: "@atomist/slack-messages" "~1.2.0" "@auto-it/core" "link:packages/core" @@ -6785,12 +6785,10 @@ escodegen@^1.14.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^6.11.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" - integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.0.0.tgz#024d661444319686c588c8849c8da33815dbdb1c" + integrity sha512-5EaAVPsIHu+grmm5WKjxUia4yHgRrbkd8I0ffqUSwixCPMVBrbS97UnzlEY/Q7OWo584vgixefM0kJnUfo/VjA== eslint-config-xo@^0.33.1: version "0.33.1" @@ -7742,11 +7740,6 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" From 60ae656fc57af4b8c93f09aad4f1ffb10645e2ab Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Mon, 22 Feb 2021 09:40:25 -0800 Subject: [PATCH 2/3] update prettier-config-eslint configuration --- .eslintrc | 5 ++--- package.json | 3 +-- yarn.lock | 21 +-------------------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/.eslintrc b/.eslintrc index de1ff92a2..1173f1389 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,11 +13,10 @@ "plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript", - "prettier", - "prettier/@typescript-eslint" + "prettier" ], - "plugins": ["prettier", "jest", "@typescript-eslint", "eslint-plugin-jsdoc", "import"], + "plugins": ["jest", "@typescript-eslint", "eslint-plugin-jsdoc", "import"], "rules": { "import/no-extraneous-dependencies": 2, diff --git a/package.json b/package.json index 58af0c0bc..45f13f1d4 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "eslint-plugin-import": "^2.22.0", "eslint-plugin-jest": "^24.0.1", "eslint-plugin-jsdoc": "^31.0.3", - "eslint-plugin-prettier": "^3.1.4", "graphql": "^15.0.0", "husky": "^4.0.7", "jest": "~26.6.3", @@ -70,7 +69,7 @@ "lint-staged": "^10.0.7", "next-ignite": "^0.9.20", "patch-package": "^6.2.2", - "prettier": "^2.0.1", + "prettier": "^2.2.1", "prism-react-renderer": "^1.1.1", "push-dir": "^0.4.1", "rimraf": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index dfcad9b80..98202c55e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6852,13 +6852,6 @@ eslint-plugin-jsdoc@^31.0.3: semver "^7.3.4" spdx-expression-parse "^3.0.1" -eslint-plugin-prettier@^3.1.4: - version "3.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" - integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== - dependencies: - prettier-linter-helpers "^1.0.0" - eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -7214,11 +7207,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - fast-glob@^2.2.6: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" @@ -12485,14 +12473,7 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - -prettier@^2.0.1, prettier@^2.0.5: +prettier@^2.0.5, prettier@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== From a499b1b6fbed951348fc5efe7acc68da18f2cfe4 Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Mon, 22 Feb 2021 09:44:11 -0800 Subject: [PATCH 3/3] upgrade prettier --- .circleci/config.yml | 4 +-- .github/ISSUE_TEMPLATE/bug_report.md | 6 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 5 ++- .prettierignore | 11 +++++- docs/pages/blog.js | 2 +- docs/pages/blog/using-shipit.mdx | 2 +- docs/pages/blog/v8.mdx | 2 +- docs/pages/blog/why.mdx | 2 +- docs/pages/docs/build-platforms/jenkins.mdx | 3 +- docs/pages/docs/extras/create-labels.md | 2 +- docs/pages/docs/index.mdx | 8 ++--- docs/pages/docs/plugins/changelog-hooks.mdx | 2 +- docs/pages/index.mdx | 6 ++-- docs/public/manifest.json | 2 +- packages/cli/__tests__/config.test.ts | 2 +- .../core/src/__tests__/auto-in-pr-ci.test.ts | 4 +-- packages/core/src/auto-args.ts | 34 ++++++++++--------- packages/core/src/config.ts | 3 +- packages/core/src/git.ts | 4 +-- .../src/utils/__tests__/exec-promise.test.ts | 6 ++-- .../src/utils/__tests__/load-plugin.test.ts | 2 +- packages/core/src/utils/load-plugins.ts | 4 +-- .../core/src/utils/test-config/package.json | 7 +++- packages/package-json-utils/src/index.ts | 4 +-- plugins/gh-pages/README.md | 2 +- plugins/magic-zero/README.md | 4 +-- plugins/microsoft-teams/README.md | 2 +- plugins/released/src/index.ts | 7 ++-- plugins/slack/README.md | 9 +++-- .../__tests__/upload-assets-ci.test.ts | 2 +- .../__tests__/upload-assets.test.ts | 6 ++-- plugins/vscode/src/utils.ts | 2 +- scripts/create-package.js | 28 +++++++-------- scripts/create-plugin.js | 28 +++++++-------- tsconfig.dev.json | 2 +- typings/dot-properties.d.ts | 2 +- typings/endent.d.ts | 2 +- typings/fromentries.d.ts | 2 +- typings/get-monorepo-packages.d.ts | 2 +- typings/import-cwd.d.ts | 2 +- typings/module-alias.d.ts | 2 +- typings/node-pom-parser.d.ts | 2 +- typings/parse-author.d.ts | 2 +- typings/tweet-tweet.d.ts | 2 +- 44 files changed, 127 insertions(+), 110 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 912c16e57..7814833f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ defaults: &defaults docker: - image: circleci/node:12-browsers environment: - TZ: '/usr/share/zoneinfo/America/Los_Angeles' + TZ: "/usr/share/zoneinfo/America/Los_Angeles" aliases: # Circle related commands @@ -122,7 +122,7 @@ workflows: - build - release: - context: '@auto-canary' + context: "@auto-canary" requires: - test - lint diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c2dd62107..d1902165e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- **Describe the bug** @@ -30,6 +29,7 @@ assignees: '' ```txt + ``` **Additional context** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c4900c828..f52b3b9cd 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "" labels: enhancement -assignees: '' - +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.prettierignore b/.prettierignore index ff03702f0..684adb2f5 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,10 @@ -scripts/template-plugin/ \ No newline at end of file +scripts/template-plugin/ +CHANGELOG.md +coverage +.next +.mdx-data +docs/out +docs/generated +dist/ +test-plugin-malformed.js +lerna.json \ No newline at end of file diff --git a/docs/pages/blog.js b/docs/pages/blog.js index e15ad9fae..ac985f3e6 100644 --- a/docs/pages/blog.js +++ b/docs/pages/blog.js @@ -3,4 +3,4 @@ import { BlogIndex } from "next-ignite"; /** The blog index */ const Blog = () => ; -export default Blog; \ No newline at end of file +export default Blog; diff --git a/docs/pages/blog/using-shipit.mdx b/docs/pages/blog/using-shipit.mdx index a6458e9cc..76f8f5b44 100644 --- a/docs/pages/blog/using-shipit.mdx +++ b/docs/pages/blog/using-shipit.mdx @@ -3,7 +3,7 @@ image: https://images.unsplash.com/photo-1556473062-062e556b0920?ixlib=rb-1.2.1& title: Stress-free Continuous Delivery with auto author: Andrew Lisowski email: lisowski54@gmail.com -date: 'Thu, 12 Mar 2020 23:00:02 -0700' +date: "Thu, 12 Mar 2020 23:00:02 -0700" --- `auto` makes releasing your code a breeze. Instead of manually calculating a version and doing your whole release process manually, `auto` takes care of it for you. diff --git a/docs/pages/blog/v8.mdx b/docs/pages/blog/v8.mdx index 6130492d3..599db2ef6 100644 --- a/docs/pages/blog/v8.mdx +++ b/docs/pages/blog/v8.mdx @@ -3,7 +3,7 @@ image: https://images.unsplash.com/photo-1485795046599-702122cd1267?crop=entropy title: Announcing "auto" 8.0.0 author: Andrew Lisowski email: lisowski54@gmail.com -date: 'Thu, 12 Mar 2020 23:00:02 -0700' +date: "Thu, 12 Mar 2020 23:00:02 -0700" --- We are excited to announce the release of `auto` 8.0.0. diff --git a/docs/pages/blog/why.mdx b/docs/pages/blog/why.mdx index 046aa193a..8a901730d 100644 --- a/docs/pages/blog/why.mdx +++ b/docs/pages/blog/why.mdx @@ -3,7 +3,7 @@ image: https://cdn-images-1.medium.com/max/800/1*TVSbt7qsyleNiQ84la_log.jpeg title: Death to Monotony author: Adam Dierkens url: https://github.intuit.com/adierkens -date: 'Thu, 12 Mar 2020 23:00:02 -0700' +date: "Thu, 12 Mar 2020 23:00:02 -0700" --- # How auto can "handle the rest for you" diff --git a/docs/pages/docs/build-platforms/jenkins.mdx b/docs/pages/docs/build-platforms/jenkins.mdx index 5eaef889b..7b166cc3b 100644 --- a/docs/pages/docs/build-platforms/jenkins.mdx +++ b/docs/pages/docs/build-platforms/jenkins.mdx @@ -92,7 +92,7 @@ For `auto`'s prerelease to work you need to makes sure that you jenkins instance ![A screenshot of the jenkins configuration](/jenkins-next-branches.png) -2. Add this to the top of your `Jenkinsfile`. +2. Add this to the top of your `Jenkinsfile`. ```groovy // Exit the branch build if not on "baseBranch" or a prerelease, but still do PR builds @@ -120,6 +120,7 @@ For `auto`'s prerelease to work you need to makes sure that you jenkins instance } } ``` + 4. Add a stage for the prerelease ```groovy diff --git a/docs/pages/docs/extras/create-labels.md b/docs/pages/docs/extras/create-labels.md index d3dd7428a..dd6e24b3b 100644 --- a/docs/pages/docs/extras/create-labels.md +++ b/docs/pages/docs/extras/create-labels.md @@ -1 +1 @@ -> :warning: For this to work you must have a \`GH_TOKEN\` set, ex: \`GH_TOKEN=YOUR_TOKEN auto create-labels\` \ No newline at end of file +> :warning: For this to work you must have a \`GH_TOKEN\` set, ex: \`GH_TOKEN=YOUR_TOKEN auto create-labels\` diff --git a/docs/pages/docs/index.mdx b/docs/pages/docs/index.mdx index 0ddedfc2a..fbf7ef0b0 100644 --- a/docs/pages/docs/index.mdx +++ b/docs/pages/docs/index.mdx @@ -7,11 +7,7 @@ import { GetStarted } from "../../plugins/get-started-button"; media="(prefers-color-scheme: dark)" className="w-full" /> - Auto Logo + Auto Logo @@ -58,4 +54,4 @@ For instance, you could just use `auto changelog` to generate the changelog and
-
\ No newline at end of file + diff --git a/docs/pages/docs/plugins/changelog-hooks.mdx b/docs/pages/docs/plugins/changelog-hooks.mdx index 2fea03c78..ca95eac51 100644 --- a/docs/pages/docs/plugins/changelog-hooks.mdx +++ b/docs/pages/docs/plugins/changelog-hooks.mdx @@ -14,7 +14,7 @@ This is where you hook into the changelog's hooks. See examples below. ```ts -auto.hooks.onCreateChangelog.tapPromise('Giphy', (changelog, { bump }) => {}); +auto.hooks.onCreateChangelog.tapPromise("Giphy", (changelog, { bump }) => {}); ``` ## addToBody diff --git a/docs/pages/index.mdx b/docs/pages/index.mdx index b15c931ee..a5dacdfc0 100644 --- a/docs/pages/index.mdx +++ b/docs/pages/index.mdx @@ -1,7 +1,7 @@ --- -layout: 'nav-bar' +layout: "nav-bar" --- -import Home from '../plugins/home' +import Home from "../plugins/home"; - \ No newline at end of file + diff --git a/docs/public/manifest.json b/docs/public/manifest.json index c9e128921..3d9f5cf5f 100644 --- a/docs/public/manifest.json +++ b/docs/public/manifest.json @@ -7,4 +7,4 @@ "description": "The documentation for using auto.", "display": "standalone", "orientation": "portrait" -} \ No newline at end of file +} diff --git a/packages/cli/__tests__/config.test.ts b/packages/cli/__tests__/config.test.ts index 50e25e72e..961f822db 100644 --- a/packages/cli/__tests__/config.test.ts +++ b/packages/cli/__tests__/config.test.ts @@ -7,7 +7,7 @@ test.each(commands.map((c) => [c.name, c] as const))( (name, command) => { const configOptions = globalOptions.props[name]?.props || {}; - expect.assertions(command.options?.filter((o) => o.config).length ?? 0); + expect.assertions(command.options?.filter((o) => o.config).length ?? 0); Object.keys(configOptions).forEach((option) => { expect(command.options.some((o) => camelCase(o.name) === option)).toBe( diff --git a/packages/core/src/__tests__/auto-in-pr-ci.test.ts b/packages/core/src/__tests__/auto-in-pr-ci.test.ts index a9a834424..b9da28a31 100644 --- a/packages/core/src/__tests__/auto-in-pr-ci.test.ts +++ b/packages/core/src/__tests__/auto-in-pr-ci.test.ts @@ -37,7 +37,7 @@ jest.mock("@octokit/rest", () => { }; issues = { - listLabelsOnIssue: jest.fn().mockReturnValue({ data: []}), + listLabelsOnIssue: jest.fn().mockReturnValue({ data: [] }), }; hook = { @@ -239,7 +239,7 @@ describe("next in ci", () => { jest.spyOn(console, "log").mockImplementation(); auto.git!.getLatestTagInBranch = () => Promise.resolve("1.4.0-next.0"); auto.release!.getSemverBump = () => Promise.resolve(SEMVER.patch); - + auto.git!.getLabels = () => Promise.resolve([]); expect(await auto.getVersion()).toBe(SEMVER.prepatch); diff --git a/packages/core/src/auto-args.ts b/packages/core/src/auto-args.ts index 184ca4cc5..f8e187412 100644 --- a/packages/core/src/auto-args.ts +++ b/packages/core/src/auto-args.ts @@ -159,23 +159,25 @@ interface ForceOption { force?: boolean; } -export type ICanaryOptions = QuietOption & ForceOption & { - /** Do not actually do anything */ - dryRun?: boolean; - /** THe PR to attach the canary to */ - pr?: number; - /** The build to attach the canary to */ - build?: number; - /** The message used when attaching the canary version to a PR */ - message?: string | "false"; -}; +export type ICanaryOptions = QuietOption & + ForceOption & { + /** Do not actually do anything */ + dryRun?: boolean; + /** THe PR to attach the canary to */ + pr?: number; + /** The build to attach the canary to */ + build?: number; + /** The message used when attaching the canary version to a PR */ + message?: string | "false"; + }; -export type INextOptions = QuietOption & ForceOption & { - /** Do not actually do anything */ - dryRun?: boolean; - /** The message used when attaching the prerelease version to a PR */ - message?: string; -}; +export type INextOptions = QuietOption & + ForceOption & { + /** Do not actually do anything */ + dryRun?: boolean; + /** The message used when attaching the prerelease version to a PR */ + message?: string; + }; export interface IInfoOptions { /** List some of the available plugins */ diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 4963aa020..084b8368a 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -91,7 +91,8 @@ export default class Config { return { ...rawConfig, labels, - prereleaseBranches: rawConfig.prereleaseBranches || DEFAULT_PRERELEASE_BRANCHES, + prereleaseBranches: + rawConfig.prereleaseBranches || DEFAULT_PRERELEASE_BRANCHES, versionBranches: typeof rawConfig.versionBranches === "boolean" && rawConfig.versionBranches diff --git a/packages/core/src/git.ts b/packages/core/src/git.ts index d500ae6fa..576befa88 100644 --- a/packages/core/src/git.ts +++ b/packages/core/src/git.ts @@ -883,13 +883,13 @@ export default class Git { "--merged", branch, ]); - + return tags .split("\n") .map((tag) => tag.trim()) .filter(Boolean); } catch (error) { - return [] + return []; } } diff --git a/packages/core/src/utils/__tests__/exec-promise.test.ts b/packages/core/src/utils/__tests__/exec-promise.test.ts index f0d16fd17..6e4fd4d77 100644 --- a/packages/core/src/utils/__tests__/exec-promise.test.ts +++ b/packages/core/src/utils/__tests__/exec-promise.test.ts @@ -30,9 +30,11 @@ test("fails correctly", async () => { }); test("fails correctly with GH_TOKEN", async () => { - process.env.GH_TOKEN = '1234567890' + process.env.GH_TOKEN = "1234567890"; expect.assertions(1); - return expect(exec("false", [process.env.GH_TOKEN])).rejects.toMatchInlineSnapshot( + return expect( + exec("false", [process.env.GH_TOKEN]) + ).rejects.toMatchInlineSnapshot( `[Error: Running command 'false' with args [****7890] failed]` ); }); diff --git a/packages/core/src/utils/__tests__/load-plugin.test.ts b/packages/core/src/utils/__tests__/load-plugin.test.ts index d4afbcdc5..7ce7679ed 100644 --- a/packages/core/src/utils/__tests__/load-plugin.test.ts +++ b/packages/core/src/utils/__tests__/load-plugin.test.ts @@ -41,7 +41,7 @@ jest.mock( describe("loadPlugins", () => { beforeEach(() => { - setLogLevel('quiet'); + setLogLevel("quiet"); }); test("should load official plugins", () => { diff --git a/packages/core/src/utils/load-plugins.ts b/packages/core/src/utils/load-plugins.ts index eabaca874..ffade5262 100644 --- a/packages/core/src/utils/load-plugins.ts +++ b/packages/core/src/utils/load-plugins.ts @@ -132,8 +132,8 @@ export function findPlugin( if (exists(localPath)) { return localPath; - } - + } + if (extendedLocation) { localPath = path.join( extendedLocation.endsWith("package.json") diff --git a/packages/core/src/utils/test-config/package.json b/packages/core/src/utils/test-config/package.json index a728bd12d..bd2314701 100644 --- a/packages/core/src/utils/test-config/package.json +++ b/packages/core/src/utils/test-config/package.json @@ -2,7 +2,12 @@ "auto": { "plugins": [ "./some-other-plugin.js", - ["./some-plugin.js", {"foo": "bar"}] + [ + "./some-plugin.js", + { + "foo": "bar" + } + ] ] } } diff --git a/packages/package-json-utils/src/index.ts b/packages/package-json-utils/src/index.ts index da0a3d565..3914564c6 100644 --- a/packages/package-json-utils/src/index.ts +++ b/packages/package-json-utils/src/index.ts @@ -19,9 +19,7 @@ export interface IRepoConfig { } /** Try to the the owner/repo from the package.json */ -export async function getRepo(): Promise< - IRepoConfig | undefined -> { +export async function getRepo(): Promise { const { repository } = await loadPackageJson(); if (!repository) { diff --git a/plugins/gh-pages/README.md b/plugins/gh-pages/README.md index bf2a3bf59..4bdb5cb98 100644 --- a/plugins/gh-pages/README.md +++ b/plugins/gh-pages/README.md @@ -57,7 +57,7 @@ If you also want `auto` to run the build for you docs site provide the `buildCom } ``` -You *must* also make sure that your built website is in your `.gitignore`. +You _must_ also make sure that your built website is in your `.gitignore`. Otherwise your release will fail because of uncommitted changes. **.gitignore:** diff --git a/plugins/magic-zero/README.md b/plugins/magic-zero/README.md index 6f0b28101..0c6cbe8ad 100644 --- a/plugins/magic-zero/README.md +++ b/plugins/magic-zero/README.md @@ -13,7 +13,7 @@ _Starting version:_ `0.0.1` `patch` => `0.0.2` `minor` => `0.0.2` `major` => `0.0.2` -`graduate` => `0.1.0` +`graduate` => `0.1.0` **0.x.y:** @@ -22,7 +22,7 @@ _Starting version:_ `0.1.0` `patch` => `0.1.1` `minor` => `0.1.1` `major` => `0.2.0` -`graduate` => `1.0.0` +`graduate` => `1.0.0` Once you're project is `>= 1.0.0` this plugin effectively does nothing. diff --git a/plugins/microsoft-teams/README.md b/plugins/microsoft-teams/README.md index 10ee46fd3..7996e97cc 100644 --- a/plugins/microsoft-teams/README.md +++ b/plugins/microsoft-teams/README.md @@ -15,7 +15,7 @@ yarn add -D @auto-it/microsoft-teams ## Usage To use the plugin include it in your `.autorc`. -To generate incoming webhook in microsoft teams, checkout [this blog](https://medium.com/@ankush.kumar133/get-started-with-microsoft-team-connectors-incoming-webhook-a330657993e7). +To generate incoming webhook in microsoft teams, checkout [this blog](https://medium.com/@ankush.kumar133/get-started-with-microsoft-team-connectors-incoming-webhook-a330657993e7). ```json { diff --git a/plugins/released/src/index.ts b/plugins/released/src/index.ts index d38a5ac65..cee939eea 100644 --- a/plugins/released/src/index.ts +++ b/plugins/released/src/index.ts @@ -43,9 +43,10 @@ export default class ReleasedLabelPlugin implements IPlugin { /** Initialize the plugin with it's options */ constructor(options: Partial = {}) { - this.options = merge(defaultOptions, options) as Required< - IReleasedLabelPluginOptions - >; + this.options = merge( + defaultOptions, + options + ) as Required; } /** Tap into auto plugin points. */ diff --git a/plugins/slack/README.md b/plugins/slack/README.md index 2e8bb8068..b1ba2a1c0 100644 --- a/plugins/slack/README.md +++ b/plugins/slack/README.md @@ -50,7 +50,7 @@ However, if you would like to configure it such that Slack _does_ post on prerel [ "slack", { "url": "https://url-to-your-slack-hook.com", "publishPreRelease": true } - ], + ] ] } ``` @@ -64,8 +64,11 @@ Additional Title to add at the start of the slack message. "plugins": [ [ "slack", - { "url": "https://url-to-your-slack-hook.com", "title": "My Cool Project" } - ], + { + "url": "https://url-to-your-slack-hook.com", + "title": "My Cool Project" + } + ] ] } ``` diff --git a/plugins/upload-assets/__tests__/upload-assets-ci.test.ts b/plugins/upload-assets/__tests__/upload-assets-ci.test.ts index 3d8660dbe..aa689f682 100644 --- a/plugins/upload-assets/__tests__/upload-assets-ci.test.ts +++ b/plugins/upload-assets/__tests__/upload-assets-ci.test.ts @@ -43,7 +43,7 @@ describe("Upload Assets Plugin", () => { prefixRelease: (v) => v, git: { options, - getFirstCommit: () => 'abc', + getFirstCommit: () => "abc", addToPrBody, github: { repos: { uploadReleaseAsset, createRelease }, diff --git a/plugins/upload-assets/__tests__/upload-assets.test.ts b/plugins/upload-assets/__tests__/upload-assets.test.ts index f51d9c307..8ce4e75e4 100644 --- a/plugins/upload-assets/__tests__/upload-assets.test.ts +++ b/plugins/upload-assets/__tests__/upload-assets.test.ts @@ -115,7 +115,7 @@ describe("Upload Assets Plugin", () => { logger: dummyLog(), prefixRelease: (v) => v, git: { - getFirstCommit: () => 'abc', + getFirstCommit: () => "abc", options, github: { repos: { uploadReleaseAsset, createRelease }, @@ -193,7 +193,7 @@ describe("Upload Assets Plugin", () => { prefixRelease: (v) => v, git: { options, - getFirstCommit: () => 'abc', + getFirstCommit: () => "abc", github: { repos: { uploadReleaseAsset, createRelease }, paginate: jest.fn().mockResolvedValue([]), @@ -228,7 +228,7 @@ describe("Upload Assets Plugin", () => { prefixRelease: (v) => v, git: { options, - getFirstCommit: () => 'abc', + getFirstCommit: () => "abc", github: { repos: { uploadReleaseAsset, createRelease }, paginate: jest.fn().mockResolvedValue([]), diff --git a/plugins/vscode/src/utils.ts b/plugins/vscode/src/utils.ts index 28038e391..680948fa0 100644 --- a/plugins/vscode/src/utils.ts +++ b/plugins/vscode/src/utils.ts @@ -8,4 +8,4 @@ export const writeFile = promisify(fs.writeFile); /** Load and parse the root package json for the project */ export async function loadPackageJson(root = "./"): Promise { return JSON.parse(await readFile(path.join(root, "package.json"), "utf-8")); -} \ No newline at end of file +} diff --git a/scripts/create-package.js b/scripts/create-package.js index 300434057..71c232ba6 100755 --- a/scripts/create-package.js +++ b/scripts/create-package.js @@ -1,20 +1,20 @@ #!/usr/bin/env node -const copy = require('copy-template-dir'); -const path = require('path'); -const log = require('signale'); -const fs = require('fs'); -const changeCase = require('change-case'); -const { titleCase } = require('title-case'); +const copy = require("copy-template-dir"); +const path = require("path"); +const log = require("signale"); +const fs = require("fs"); +const changeCase = require("change-case"); +const { titleCase } = require("title-case"); const [, , name, description] = process.argv; const { version } = JSON.parse( - fs.readFileSync(path.join(__dirname, '../lerna.json'), 'utf8') + fs.readFileSync(path.join(__dirname, "../lerna.json"), "utf8") ); -const inDir = path.join(__dirname, './template-package'); +const inDir = path.join(__dirname, "./template-package"); const kebab = changeCase.paramCase(name); -const outDir = path.join(__dirname, '../packages', kebab); -const TSCONFIG = path.join(__dirname, '../tsconfig.dev.json'); +const outDir = path.join(__dirname, "../packages", kebab); +const TSCONFIG = path.join(__dirname, "../tsconfig.dev.json"); fs.mkdirSync(outDir); @@ -23,7 +23,7 @@ const vars = { version, title: titleCase(name), kebab, - pascal: changeCase.pascalCase(name) + pascal: changeCase.pascalCase(name), }; copy(inDir, outDir, vars, (err, createdFiles) => { @@ -31,13 +31,13 @@ copy(inDir, outDir, vars, (err, createdFiles) => { throw err; } - createdFiles.forEach(filePath => + createdFiles.forEach((filePath) => log.info(`Created ${path.relative(outDir, filePath)}`) ); log.success(`Created @auto-it/${kebab} package!`); }); -fs.readFile(TSCONFIG, 'utf8', (err, data) => { +fs.readFile(TSCONFIG, "utf8", (err, data) => { if (err) { throw err; } @@ -45,7 +45,7 @@ fs.readFile(TSCONFIG, 'utf8', (err, data) => { const json = JSON.parse(data); json.references.push({ - path: `packages/${kebab}` + path: `packages/${kebab}`, }); fs.writeFileSync(TSCONFIG, JSON.stringify(json, null, 2)); diff --git a/scripts/create-plugin.js b/scripts/create-plugin.js index 857492ad8..b37ec2b37 100755 --- a/scripts/create-plugin.js +++ b/scripts/create-plugin.js @@ -1,20 +1,20 @@ #!/usr/bin/env node -const copy = require('copy-template-dir'); -const path = require('path'); -const log = require('signale'); -const fs = require('fs'); -const changeCase = require('change-case'); -const { titleCase } = require('title-case'); +const copy = require("copy-template-dir"); +const path = require("path"); +const log = require("signale"); +const fs = require("fs"); +const changeCase = require("change-case"); +const { titleCase } = require("title-case"); const [, , name, description] = process.argv; const { version } = JSON.parse( - fs.readFileSync(path.join(__dirname, '../lerna.json'), 'utf8') + fs.readFileSync(path.join(__dirname, "../lerna.json"), "utf8") ); -const inDir = path.join(__dirname, './template-plugin'); +const inDir = path.join(__dirname, "./template-plugin"); const kebab = changeCase.paramCase(name); -const outDir = path.join(__dirname, '../plugins', kebab); -const TSCONFIG = path.join(__dirname, '../tsconfig.dev.json'); +const outDir = path.join(__dirname, "../plugins", kebab); +const TSCONFIG = path.join(__dirname, "../tsconfig.dev.json"); fs.mkdirSync(outDir); @@ -23,7 +23,7 @@ const vars = { version, title: titleCase(name), kebab, - pascal: changeCase.pascalCase(name) + pascal: changeCase.pascalCase(name), }; copy(inDir, outDir, vars, (err, createdFiles) => { @@ -31,13 +31,13 @@ copy(inDir, outDir, vars, (err, createdFiles) => { throw err; } - createdFiles.forEach(filePath => + createdFiles.forEach((filePath) => log.info(`Created ${path.relative(outDir, filePath)}`) ); log.success(`Created @auto-it/${kebab} plugin!`); }); -fs.readFile(TSCONFIG, 'utf8', (err, data) => { +fs.readFile(TSCONFIG, "utf8", (err, data) => { if (err) { throw err; } @@ -45,7 +45,7 @@ fs.readFile(TSCONFIG, 'utf8', (err, data) => { const json = JSON.parse(data); json.references.push({ - path: `plugins/${kebab}` + path: `plugins/${kebab}`, }); fs.writeFileSync(TSCONFIG, JSON.stringify(json, null, 2)); diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 2c7572a2e..72275a469 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -90,4 +90,4 @@ "path": "plugins/s3" } ] -} \ No newline at end of file +} diff --git a/typings/dot-properties.d.ts b/typings/dot-properties.d.ts index cba60bf41..33a019a11 100644 --- a/typings/dot-properties.d.ts +++ b/typings/dot-properties.d.ts @@ -1,3 +1,3 @@ -declare module 'dot-properties' { +declare module "dot-properties" { export function parse(file: string): { version?: string }; } diff --git a/typings/endent.d.ts b/typings/endent.d.ts index 9ff5dc0e2..357231f61 100644 --- a/typings/endent.d.ts +++ b/typings/endent.d.ts @@ -1,4 +1,4 @@ -declare module 'endent' { +declare module "endent" { function endent(literals: string): string; function endent( literals: TemplateStringsArray, diff --git a/typings/fromentries.d.ts b/typings/fromentries.d.ts index ccf3cd8f2..78459b4ff 100644 --- a/typings/fromentries.d.ts +++ b/typings/fromentries.d.ts @@ -1,4 +1,4 @@ -declare module 'fromentries' { +declare module "fromentries" { export default function fromEntries( entries: Iterable ): { [k in PropertyKey]: T }; diff --git a/typings/get-monorepo-packages.d.ts b/typings/get-monorepo-packages.d.ts index 1be04be17..a790b350a 100644 --- a/typings/get-monorepo-packages.d.ts +++ b/typings/get-monorepo-packages.d.ts @@ -98,7 +98,7 @@ interface IScriptsMap { [scriptName: string]: string; } -declare module 'get-monorepo-packages' { +declare module "get-monorepo-packages" { interface IPackage { location: string; package: IPackageJSON; diff --git a/typings/import-cwd.d.ts b/typings/import-cwd.d.ts index 0dc10bab6..cf44ad6d6 100644 --- a/typings/import-cwd.d.ts +++ b/typings/import-cwd.d.ts @@ -1,4 +1,4 @@ -declare module 'import-cwd' { +declare module "import-cwd" { function importCwd(path: string): any; export = importCwd; } diff --git a/typings/module-alias.d.ts b/typings/module-alias.d.ts index 98e39efae..870bf3e05 100644 --- a/typings/module-alias.d.ts +++ b/typings/module-alias.d.ts @@ -1 +1 @@ -declare module 'module-alias'; +declare module "module-alias"; diff --git a/typings/node-pom-parser.d.ts b/typings/node-pom-parser.d.ts index 83af63877..02a268f74 100644 --- a/typings/node-pom-parser.d.ts +++ b/typings/node-pom-parser.d.ts @@ -1,4 +1,4 @@ -declare module 'pom-parser' { +declare module "pom-parser" { interface IDeveloper { name: string; email: string; diff --git a/typings/parse-author.d.ts b/typings/parse-author.d.ts index c8830b6a1..5b3bdafd6 100644 --- a/typings/parse-author.d.ts +++ b/typings/parse-author.d.ts @@ -1,4 +1,4 @@ -declare module 'parse-author' { +declare module "parse-author" { function parseAuthor(author: string): IAuthor; export = parseAuthor; } diff --git a/typings/tweet-tweet.d.ts b/typings/tweet-tweet.d.ts index 543ff8c27..0838a395f 100644 --- a/typings/tweet-tweet.d.ts +++ b/typings/tweet-tweet.d.ts @@ -1,4 +1,4 @@ -declare module 'tweet-tweet' { +declare module "tweet-tweet" { interface IOptions { consumerKey: string; consumerSecret: string;