@dword-design/base 13.0.8 → 13.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.
Files changed (69) hide show
  1. package/dist/cli.js +15 -15
  2. package/dist/commands/check-unknown-files/index.js +18 -18
  3. package/dist/commands/check-unknown-files/unknown-files-error.js +5 -5
  4. package/dist/commands/commit/index.d.ts +1 -5
  5. package/dist/commands/commit/index.js +5 -5
  6. package/dist/commands/depcheck/index.js +11 -11
  7. package/dist/commands/lint/index.d.ts +1 -5
  8. package/dist/commands/lint/index.js +32 -7
  9. package/dist/commands/prepare/index.js +13 -13
  10. package/dist/commands/test-docker/index.d.ts +1 -5
  11. package/dist/commands/test-docker/index.js +12 -12
  12. package/dist/commands/test-raw/index.d.ts +1 -8
  13. package/dist/commands/test-raw/index.js +12 -12
  14. package/dist/commands/test-raw/is-ci.d.ts +1 -1
  15. package/dist/commands/test-raw/is-ci.js +3 -3
  16. package/dist/commands/test-raw/package-json-schema.d.ts +1 -1
  17. package/dist/commands/test-raw/package-json-schema.js +20 -20
  18. package/dist/get-depcheck-special-base/index.js +2 -2
  19. package/dist/get-generated-files/commitizen.js +1 -1
  20. package/dist/get-generated-files/commitlint.js +3 -3
  21. package/dist/get-generated-files/common-editor-ignore.js +1 -1
  22. package/dist/get-generated-files/editorconfig.js +1 -1
  23. package/dist/get-generated-files/get-editor-ignore/index.js +1 -1
  24. package/dist/get-generated-files/get-eslint/index.js +3 -3
  25. package/dist/get-generated-files/get-github-sync-metadata/index.d.ts +3 -3
  26. package/dist/get-generated-files/get-github-sync-metadata/index.js +6 -6
  27. package/dist/get-generated-files/get-github-workflow/index.js +4 -4
  28. package/dist/get-generated-files/get-github-workflow/steps/cancel-existing.d.ts +1 -1
  29. package/dist/get-generated-files/get-github-workflow/steps/cancel-existing.js +2 -2
  30. package/dist/get-generated-files/get-github-workflow/steps/check-unknown-files.js +1 -1
  31. package/dist/get-generated-files/get-github-workflow/steps/coverage.d.ts +1 -1
  32. package/dist/get-generated-files/get-github-workflow/steps/coverage.js +2 -2
  33. package/dist/get-generated-files/get-github-workflow/steps/get-release.js +9 -9
  34. package/dist/get-generated-files/get-github-workflow/steps/get-test.d.ts +1 -1
  35. package/dist/get-generated-files/get-github-workflow/steps/get-test.js +14 -14
  36. package/dist/get-generated-files/get-github-workflow/strategies/job-matrix.js +16 -16
  37. package/dist/get-generated-files/get-github-workflow/strategies/simple.js +7 -7
  38. package/dist/get-generated-files/get-gitignore/index.js +2 -2
  39. package/dist/get-generated-files/get-gitpod/index.js +5 -5
  40. package/dist/get-generated-files/get-gitpod-dockerfile.js +1 -1
  41. package/dist/get-generated-files/get-license-string.js +3 -3
  42. package/dist/get-generated-files/get-package-config/index.js +12 -12
  43. package/dist/get-generated-files/get-readme-string/index.js +5 -5
  44. package/dist/get-generated-files/get-readme-string/replacements.js +12 -12
  45. package/dist/get-generated-files/get-release/index.js +3 -3
  46. package/dist/get-generated-files/get-renovate/index.d.ts +1 -27
  47. package/dist/get-generated-files/get-renovate/index.js +14 -14
  48. package/dist/get-generated-files/get-typescript.js +8 -8
  49. package/dist/get-generated-files/get-vscode/index.js +4 -4
  50. package/dist/get-generated-files/gitattributes.js +1 -1
  51. package/dist/get-generated-files/github-codespaces.js +1 -1
  52. package/dist/get-generated-files/github-deprecated-dependencies/index.d.ts +5 -5
  53. package/dist/get-generated-files/github-deprecated-dependencies/index.js +15 -15
  54. package/dist/get-generated-files/github-deprecated-dependencies-issue-template.js +1 -1
  55. package/dist/get-generated-files/github-funding.js +3 -3
  56. package/dist/get-generated-files/github-labels.js +5 -5
  57. package/dist/get-generated-files/github-sync-labels.d.ts +2 -2
  58. package/dist/get-generated-files/github-sync-labels.js +6 -6
  59. package/dist/get-generated-files/index.js +40 -28
  60. package/dist/get-generated-files/npmrc.js +1 -1
  61. package/dist/get-git-info/index.d.ts +1 -1
  62. package/dist/get-git-info/index.js +9 -9
  63. package/dist/index.d.ts +2 -2
  64. package/dist/index.js +25 -25
  65. package/dist/load-config/index.d.ts +1 -1
  66. package/dist/load-config/index.js +5 -5
  67. package/dist/load-config-sync/index.d.ts +1 -1
  68. package/dist/load-config-sync/index.js +5 -5
  69. package/package.json +18 -9
@@ -1,9 +1,9 @@
1
- import gitHubAction from 'tagged-template-noop';
1
+ import gitHubAction from "tagged-template-noop";
2
2
  export default function () {
3
3
  return {
4
4
  jobs: {
5
5
  build: {
6
- 'runs-on': 'ubuntu-latest',
6
+ "runs-on": "ubuntu-latest",
7
7
  steps: [{
8
8
  uses: gitHubAction`actions/checkout@v4`
9
9
  }, {
@@ -13,18 +13,18 @@ export default function () {
13
13
  ...(!this.config.syncKeywords && {
14
14
  syncKeywords: false
15
15
  }),
16
- commitMessage: 'fix: write GitHub metadata to package.json [{changes}]',
17
- githubToken: '${{ secrets.GITHUB_TOKEN }}'
16
+ commitMessage: "fix: write GitHub metadata to package.json [{changes}]",
17
+ githubToken: "${{ secrets.GITHUB_TOKEN }}"
18
18
  }
19
19
  }, {
20
20
  uses: gitHubAction`liskin/gh-workflow-keepalive@v1`
21
21
  }]
22
22
  }
23
23
  },
24
- name: 'sync-metadata',
24
+ name: "sync-metadata",
25
25
  on: {
26
26
  schedule: [{
27
- cron: '0 5 * * *'
27
+ cron: "0 5 * * *"
28
28
  }],
29
29
  workflow_dispatch: {}
30
30
  }
@@ -3,15 +3,15 @@ import simpleStrategy from "./strategies/simple.js";
3
3
  export default function () {
4
4
  return {
5
5
  concurrency: {
6
- 'cancel-in-progress': true,
7
- group: '${{ github.workflow }}-${{ github.ref }}'
6
+ "cancel-in-progress": true,
7
+ group: "${{ github.workflow }}-${{ github.ref }}"
8
8
  },
9
9
  jobs: (this.config.useJobMatrix && !this.config.testInContainer ? jobMatrixStrategy : simpleStrategy).call(this),
10
- name: 'build',
10
+ name: "build",
11
11
  on: {
12
12
  pull_request: {},
13
13
  push: {
14
- branches: ['master']
14
+ branches: ["master"]
15
15
  }
16
16
  }
17
17
  };
@@ -2,6 +2,6 @@ declare const _default: {
2
2
  env: {
3
3
  GITHUB_TOKEN: string;
4
4
  };
5
- uses: string;
5
+ uses: any;
6
6
  }[];
7
7
  export default _default;
@@ -1,7 +1,7 @@
1
- import gitHubAction from 'tagged-template-noop';
1
+ import gitHubAction from "tagged-template-noop";
2
2
  export default [{
3
3
  env: {
4
- GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
4
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
5
5
  },
6
6
  uses: gitHubAction`rokroskar/workflow-run-cleanup-action@v0.3.3`
7
7
  }];
@@ -1,3 +1,3 @@
1
1
  export default [{
2
- run: 'pnpm checkUnknownFiles'
2
+ run: "pnpm checkUnknownFiles"
3
3
  }];
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- uses: string;
2
+ uses: any;
3
3
  with: {
4
4
  token: string;
5
5
  };
@@ -1,7 +1,7 @@
1
- import gitHubAction from 'tagged-template-noop';
1
+ import gitHubAction from "tagged-template-noop";
2
2
  export default [{
3
3
  uses: gitHubAction`codecov/codecov-action@v3`,
4
4
  with: {
5
- token: '${{ secrets.CODECOV_TOKEN }}'
5
+ token: "${{ secrets.CODECOV_TOKEN }}"
6
6
  }
7
7
  }];
@@ -1,24 +1,24 @@
1
- import packageName from 'depcheck-package-name';
2
- import parsePackagejsonName from 'parse-packagejson-name';
1
+ import packageName from "depcheck-package-name";
2
+ import parsePackagejsonName from "parse-packagejson-name";
3
3
  const ci = `dw-${parsePackagejsonName(packageName`@dword-design/ci`).fullName}`;
4
4
  export default function () {
5
5
  return [{
6
6
  env: {
7
- GITHUB_REPOSITORY: '${{ secrets.GITHUB_REPOSITORY }}',
8
- GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
7
+ GITHUB_REPOSITORY: "${{ secrets.GITHUB_REPOSITORY }}",
8
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
9
9
  },
10
- name: 'Push changed files',
10
+ name: "Push changed files",
11
11
  run: `pnpm ${ci} push-changed-files`
12
12
  }, ...[...this.config.preDeploySteps, {
13
13
  env: {
14
- GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}',
14
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}",
15
15
  ...(this.config.npmPublish ? {
16
- NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
16
+ NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
17
17
  } : {}),
18
18
  ...this.config.deployEnv
19
19
  },
20
- name: 'Release',
21
- run: 'pnpm semantic-release'
20
+ name: "Release",
21
+ run: "pnpm semantic-release"
22
22
  }].map(step => ({
23
23
  if: "github.ref == 'refs/heads/master'",
24
24
  ...step
@@ -8,7 +8,7 @@ export default function (): ({
8
8
  with?: undefined;
9
9
  } | {
10
10
  if: string;
11
- uses: string;
11
+ uses: any;
12
12
  with: {
13
13
  'if-no-files-found': string;
14
14
  name: string;
@@ -1,14 +1,14 @@
1
- import pathLib from 'node:path';
2
- import { constantCase } from 'change-case';
3
- import { findUpStop, findUpSync } from 'find-up';
4
- import fs from 'fs-extra';
5
- import gitHubAction from 'tagged-template-noop';
1
+ import pathLib from "node:path";
2
+ import { constantCase } from "change-case";
3
+ import { findUpStop, findUpSync } from "find-up";
4
+ import fs from "fs-extra";
5
+ import gitHubAction from "tagged-template-noop";
6
6
  export default function () {
7
7
  const envSchemaPath = findUpSync(path => {
8
- if (fs.existsSync(pathLib.join(path, '.env.schema.json'))) {
9
- return '.env.schema.json';
8
+ if (fs.existsSync(pathLib.join(path, ".env.schema.json"))) {
9
+ return ".env.schema.json";
10
10
  }
11
- if (fs.existsSync(pathLib.join(path, 'package.json'))) {
11
+ if (fs.existsSync(pathLib.join(path, "package.json"))) {
12
12
  return findUpStop;
13
13
  }
14
14
  }, {
@@ -18,16 +18,16 @@ export default function () {
18
18
  return [{
19
19
  env: {
20
20
  ...Object.fromEntries(envVariableNames.map(name => [name, `\${{ secrets.${name} }}`])),
21
- GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
21
+ GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
22
22
  },
23
- run: 'pnpm test'
23
+ run: "pnpm test"
24
24
  }, {
25
- if: 'always()',
25
+ if: "always()",
26
26
  uses: gitHubAction`actions/upload-artifact@v4`,
27
27
  with: {
28
- 'if-no-files-found': 'ignore',
29
- name: 'Images from tests',
30
- path: 'test-results/*/**'
28
+ "if-no-files-found": "ignore",
29
+ name: "Images from tests",
30
+ path: "test-results/*/**"
31
31
  }
32
32
  }];
33
33
  }
@@ -1,4 +1,4 @@
1
- import gitHubAction from 'tagged-template-noop';
1
+ import gitHubAction from "tagged-template-noop";
2
2
  import checkUnknownFilesSteps from "../steps/check-unknown-files.js";
3
3
  import coverageSteps from "../steps/coverage.js";
4
4
  import getReleaseSteps from "../steps/get-release.js";
@@ -6,8 +6,8 @@ import getTestSteps from "../steps/get-test.js";
6
6
  export default function () {
7
7
  return {
8
8
  release: {
9
- needs: 'test',
10
- 'runs-on': 'ubuntu-latest',
9
+ needs: "test",
10
+ "runs-on": "ubuntu-latest",
11
11
  steps: [{
12
12
  uses: gitHubAction`actions/checkout@v4`,
13
13
  with: {
@@ -17,40 +17,40 @@ export default function () {
17
17
  }, {
18
18
  uses: gitHubAction`actions/setup-node@v4`,
19
19
  with: {
20
- 'node-version': this.config.nodeVersion
20
+ "node-version": this.config.nodeVersion
21
21
  }
22
22
  }, {
23
- run: 'corepack enable'
23
+ run: "corepack enable"
24
24
  }, {
25
25
  run: 'git config --global user.email "actions@github.com"'
26
26
  }, {
27
27
  run: 'git config --global user.name "GitHub Actions"'
28
28
  }, {
29
- run: 'pnpm install --frozen-lockfile'
29
+ run: "pnpm install --frozen-lockfile"
30
30
  }, ...checkUnknownFilesSteps, {
31
- run: 'pnpm lint'
31
+ run: "pnpm lint"
32
32
  }, ...getReleaseSteps.call(this)]
33
33
  },
34
34
  test: {
35
- 'runs-on': '${{ matrix.os }}',
35
+ "runs-on": "${{ matrix.os }}",
36
36
  steps: [{
37
37
  uses: gitHubAction`actions/checkout@v4`,
38
38
  with: {
39
39
  ...(this.config.fetchGitHistory && {
40
- 'fetch-depth': 0
40
+ "fetch-depth": 0
41
41
  }),
42
42
  lfs: true
43
43
  }
44
44
  }, {
45
45
  uses: gitHubAction`actions/setup-node@v4`,
46
46
  with: {
47
- 'check-latest': true,
48
- 'node-version': '${{ matrix.node }}'
47
+ "check-latest": true,
48
+ "node-version": "${{ matrix.node }}"
49
49
  }
50
50
  }, {
51
- run: 'corepack enable'
51
+ run: "corepack enable"
52
52
  }, {
53
- run: 'pnpm install --frozen-lockfile'
53
+ run: "pnpm install --frozen-lockfile"
54
54
  }, ...getTestSteps.call(this), ...coverageSteps.map(step => ({
55
55
  if: `matrix.os == 'ubuntu-latest' && matrix.node == ${this.config.nodeVersion}`,
56
56
  ...step
@@ -59,13 +59,13 @@ export default function () {
59
59
  matrix: {
60
60
  include: [...this.config.supportedNodeVersions.map(version => ({
61
61
  node: version,
62
- os: 'ubuntu-latest'
62
+ os: "ubuntu-latest"
63
63
  })), ...(this.config.macos ? [{
64
64
  node: this.config.nodeVersion,
65
- os: 'macos-latest'
65
+ os: "macos-latest"
66
66
  }] : []), ...(this.config.windows ? [{
67
67
  node: this.config.nodeVersion,
68
- os: 'windows-latest'
68
+ os: "windows-latest"
69
69
  }] : [])]
70
70
  }
71
71
  }
@@ -1,4 +1,4 @@
1
- import gitHubAction from 'tagged-template-noop';
1
+ import gitHubAction from "tagged-template-noop";
2
2
  import checkUnknownFilesSteps from "../steps/check-unknown-files.js";
3
3
  import coverageSteps from "../steps/coverage.js";
4
4
  import getReleaseSteps from "../steps/get-release.js";
@@ -7,12 +7,12 @@ export default function () {
7
7
  return {
8
8
  build: {
9
9
  if: "!contains(github.event.head_commit.message, '[skip ci]')",
10
- 'runs-on': 'ubuntu-latest',
10
+ "runs-on": "ubuntu-latest",
11
11
  steps: [{
12
12
  uses: gitHubAction`actions/checkout@v4`,
13
13
  with: {
14
14
  ...(this.config.fetchGitHistory && {
15
- 'fetch-depth': 0
15
+ "fetch-depth": 0
16
16
  }),
17
17
  lfs: true,
18
18
  ref: "${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.head.ref || '' }}"
@@ -20,17 +20,17 @@ export default function () {
20
20
  }, {
21
21
  uses: gitHubAction`actions/setup-node@v4`,
22
22
  with: {
23
- 'check-latest': true,
24
- 'node-version': this.config.nodeVersion
23
+ "check-latest": true,
24
+ "node-version": this.config.nodeVersion
25
25
  }
26
26
  }, {
27
- run: 'corepack enable'
27
+ run: "corepack enable"
28
28
  }, {
29
29
  run: 'git config --global user.email "actions@github.com"'
30
30
  }, {
31
31
  run: 'git config --global user.name "GitHub Actions"'
32
32
  }, {
33
- run: 'pnpm install --frozen-lockfile'
33
+ run: "pnpm install --frozen-lockfile"
34
34
  }, ...getTestSteps.call(this), ...coverageSteps, ...checkUnknownFilesSteps, ...getReleaseSteps.call(this)]
35
35
  }
36
36
  };
@@ -1,4 +1,4 @@
1
- import { identity, sortBy } from 'lodash-es';
1
+ import { identity, sortBy } from "lodash-es";
2
2
  export default function () {
3
- return sortBy(['.DS_Store', '/.env.json', '/.test.env.json', '/.nyc_output', '/coverage', '/node_modules', '/test-results', ...this.config.gitignore], identity);
3
+ return sortBy([".DS_Store", "/.env.json", "/.test.env.json", "/.nyc_output", "/coverage", "/node_modules", "/test-results", ...this.config.gitignore], identity);
4
4
  }
@@ -1,11 +1,11 @@
1
- import * as personalData from '@dword-design/personal-data';
2
- import endent from 'endent';
3
- import parsePackagejsonName from 'parse-packagejson-name';
1
+ import * as personalData from "@dword-design/personal-data";
2
+ import endent from "endent";
3
+ import parsePackagejsonName from "parse-packagejson-name";
4
4
  export default function () {
5
5
  const packageName = parsePackagejsonName(this.packageConfig.name).fullName;
6
6
  return {
7
7
  image: {
8
- file: '.gitpod.Dockerfile'
8
+ file: ".gitpod.Dockerfile"
9
9
  },
10
10
  tasks: [{
11
11
  // puppeteer by default installs Chromium in the home folder, but since GitPod does not preserve the home folder
@@ -27,7 +27,7 @@ export default function () {
27
27
  `
28
28
  }],
29
29
  vscode: {
30
- extensions: ['https://sebastianlandwehr.com/vscode-extensions/karlito40.fix-irregular-whitespace-0.1.1.vsix', 'https://sebastianlandwehr.com/vscode-extensions/adrianwilczynski.toggle-hidden-1.0.2.vsix', 'octref.vetur@0.33.1', 'Tobermory.es6-string-html', 'zjcompt.es6-string-javascript']
30
+ extensions: ["https://sebastianlandwehr.com/vscode-extensions/karlito40.fix-irregular-whitespace-0.1.1.vsix", "https://sebastianlandwehr.com/vscode-extensions/adrianwilczynski.toggle-hidden-1.0.2.vsix", "octref.vetur@0.33.1", "Tobermory.es6-string-html", "zjcompt.es6-string-javascript"]
31
31
  }
32
32
  };
33
33
  }
@@ -1,4 +1,4 @@
1
- import endent from 'endent';
1
+ import endent from "endent";
2
2
  export default function () {
3
3
  return endent`
4
4
  # Need to add :latest, otherwise old versions (e.g. of node) are installed
@@ -1,6 +1,6 @@
1
- import endent from 'endent';
2
- import spdxParse from 'spdx-expression-parse';
3
- import spdxList from 'spdx-license-list/full.js';
1
+ import endent from "endent";
2
+ import spdxParse from "spdx-expression-parse";
3
+ import spdxList from "spdx-license-list/full.js";
4
4
  export default function () {
5
5
  const parsed = spdxParse(this.packageConfig.license);
6
6
  const license = spdxList[parsed.license];
@@ -1,6 +1,6 @@
1
- import packageName from 'depcheck-package-name';
2
- import { mapValues, pick, stubTrue } from 'lodash-es';
3
- import sortKeys from 'sort-keys';
1
+ import packageName from "depcheck-package-name";
2
+ import { mapValues, pick, stubTrue } from "lodash-es";
3
+ import sortKeys from "sort-keys";
4
4
  export default function () {
5
5
  const commandNames = {
6
6
  checkUnknownFiles: true,
@@ -9,7 +9,7 @@ export default function () {
9
9
  lint: true,
10
10
  prepare: true,
11
11
  ...(this.config.testInContainer && {
12
- 'test:raw': true
12
+ "test:raw": true
13
13
  }),
14
14
  test: true,
15
15
  ...mapValues(this.config.commands, stubTrue)
@@ -32,22 +32,22 @@ export default function () {
32
32
  publishConfig: true,
33
33
  resolutions: true
34
34
  })),
35
- funding: 'https://github.com/sponsors/dword-design',
35
+ funding: "https://github.com/sponsors/dword-design",
36
36
  publishConfig: {
37
- access: 'public'
37
+ access: "public"
38
38
  },
39
- type: 'module',
40
- version: this.packageConfig.version || '1.0.0',
39
+ type: "module",
40
+ version: this.packageConfig.version || "1.0.0",
41
41
  ...(this.config.git && {
42
42
  repository: `dword-design/${this.config.git.project}`
43
43
  }),
44
- author: 'Sebastian Landwehr <info@sebastianlandwehr.com>',
44
+ author: "Sebastian Landwehr <info@sebastianlandwehr.com>",
45
45
  engines: {
46
46
  node: `>=${this.config.minNodeVersion || this.config.supportedNodeVersions[0]}`
47
47
  },
48
- files: ['dist'],
49
- license: 'MIT',
48
+ files: ["dist"],
49
+ license: "MIT",
50
50
  ...this.config.packageConfig,
51
- scripts: sortKeys(mapValues(commandNames, (handler, name) => this.packageConfig.name === '@dword-design/base' ? `${packageName`tsx`} src/cli.ts ${name}` : `base ${name}`))
51
+ scripts: sortKeys(mapValues(commandNames, (handler, name) => this.packageConfig.name === "@dword-design/base" ? `${packageName`tsx`} src/cli.ts ${name}` : `base ${name}`))
52
52
  };
53
53
  }
@@ -1,10 +1,10 @@
1
- import pathLib from 'node:path';
2
- import endent from 'endent';
3
- import getProjectzReadmeSectionRegex from 'get-projectz-readme-section-regex';
4
- import { readFileSync as safeReadFileSync } from 'safe-readfile';
1
+ import pathLib from "node:path";
2
+ import endent from "endent";
3
+ import getProjectzReadmeSectionRegex from "get-projectz-readme-section-regex";
4
+ import { readFileSync as safeReadFileSync } from "safe-readfile";
5
5
  import replacements from "./replacements.js";
6
6
  export default function () {
7
- const readme = safeReadFileSync(pathLib.join(this.cwd, 'README.md'), 'utf8') || endent`
7
+ const readme = safeReadFileSync(pathLib.join(this.cwd, "README.md"), "utf8") || endent`
8
8
  <!-- TITLE -->
9
9
 
10
10
  <!-- BADGES -->
@@ -1,7 +1,7 @@
1
- import endent from 'endent';
2
- import { last } from 'lodash-es';
3
- import spdxParse from 'spdx-expression-parse';
4
- import spdxList from 'spdx-license-list/full.js';
1
+ import endent from "endent";
2
+ import { last } from "lodash-es";
3
+ import spdxParse from "spdx-expression-parse";
4
+ import spdxList from "spdx-license-list/full.js";
5
5
  export default {
6
6
  badges() {
7
7
  return endent`
@@ -23,7 +23,7 @@ export default {
23
23
  `, endent`
24
24
  <a href="https://codecov.io/gh/${this.packageConfig.repository}">
25
25
  <img
26
- src="https://codecov.io/gh/${this.packageConfig.repository}/branch/master/graph/badge.svg${this.config.codecovGraphToken ? `?token=${this.config.codecovGraphToken}` : ''}"
26
+ src="https://codecov.io/gh/${this.packageConfig.repository}/branch/master/graph/badge.svg${this.config.codecovGraphToken ? `?token=${this.config.codecovGraphToken}` : ""}"
27
27
  alt="Coverage status"
28
28
  >
29
29
  </a>
@@ -31,7 +31,7 @@ export default {
31
31
  <a href="https://david-dm.org/${this.packageConfig.repository}">
32
32
  <img src="https://img.shields.io/david/${this.packageConfig.repository}" alt="Dependency status">
33
33
  </a>
34
- `, '<img src="https://img.shields.io/badge/renovate-enabled-brightgreen" alt="Renovate enabled">', '<br/>', endent`
34
+ `, '<img src="https://img.shields.io/badge/renovate-enabled-brightgreen" alt="Renovate enabled">', "<br/>", endent`
35
35
  <a href="https://gitpod.io/#https://github.com/${this.packageConfig.repository}">
36
36
  <img
37
37
  src="https://gitpod.io/button/open-in-gitpod.svg"
@@ -63,12 +63,12 @@ export default {
63
63
  width="163"
64
64
  >
65
65
  </a>
66
- `].join('')}
66
+ `].join("")}
67
67
  </p>
68
68
  `;
69
69
  },
70
70
  description() {
71
- return this.packageConfig.description || '';
71
+ return this.packageConfig.description || "";
72
72
  },
73
73
  install() {
74
74
  return this.config.readmeInstallString;
@@ -112,11 +112,11 @@ export default {
112
112
  ## See also
113
113
 
114
114
  ${this.config.seeAlso.map(entry => {
115
- const parts = entry.repository.split('/');
116
- const owner = parts.length >= 2 ? parts[0] : 'dword-design';
115
+ const parts = entry.repository.split("/");
116
+ const owner = parts.length >= 2 ? parts[0] : "dword-design";
117
117
  const name = last(parts);
118
118
  return `* [${name}](https://github.com/${owner}/${name}): ${entry.description}`;
119
- }).join('\n')}
119
+ }).join("\n")}
120
120
  `] : []), this.packageConfig.license ? [(() => {
121
121
  const parsed = spdxParse(this.packageConfig.license);
122
122
  const license = spdxList[parsed.license];
@@ -125,7 +125,7 @@ export default {
125
125
 
126
126
  [${license.name}](${license.url}) © [Sebastian Landwehr](https://sebastianlandwehr.com)
127
127
  `;
128
- })()] : []].join('\n\n');
128
+ })()] : []].join("\n\n");
129
129
  },
130
130
  title() {
131
131
  return `# ${this.packageConfig.name}`;
@@ -1,12 +1,12 @@
1
- import packageName from 'depcheck-package-name';
1
+ import packageName from "depcheck-package-name";
2
2
  export default function () {
3
3
  return {
4
- plugins: ['@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', packageName`@semantic-release/changelog`, this.config.npmPublish ? packageName`@semantic-release/npm` : [packageName`@semantic-release/npm`, {
4
+ plugins: ["@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", packageName`@semantic-release/changelog`, this.config.npmPublish ? packageName`@semantic-release/npm` : [packageName`@semantic-release/npm`, {
5
5
  npmPublish: false
6
6
  }], this.config.deployAssets.length > 0 ? [packageName`@semantic-release/github`, {
7
7
  assets: this.config.deployAssets
8
8
  }] : packageName`@semantic-release/github`, [packageName`@semantic-release/git`, {
9
- message: 'chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
9
+ message: "chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
10
10
  }], ...this.config.deployPlugins]
11
11
  };
12
12
  }
@@ -1,27 +1 @@
1
- export default function (): {
2
- extends: string[];
3
- gitIgnoredAuthors: string[];
4
- 'github-actions': {
5
- enabled: boolean;
6
- };
7
- labels: string[];
8
- lockFileMaintenance: {
9
- semanticCommitType?: string;
10
- automerge: boolean;
11
- enabled: boolean;
12
- };
13
- rangeStrategy: string;
14
- regexManagers: ({
15
- datasourceTemplate: string;
16
- fileMatch: string[];
17
- matchStrings: string[];
18
- versioningTemplate: string;
19
- } | {
20
- datasourceTemplate: string;
21
- depNameTemplate: string;
22
- fileMatch: string[];
23
- matchStrings: string[];
24
- versioningTemplate: string;
25
- })[];
26
- semanticCommitScope: null;
27
- };
1
+ export default function (): any;
@@ -1,32 +1,32 @@
1
- import deepmerge from 'deepmerge';
1
+ import deepmerge from "deepmerge";
2
2
  import getRegexManagerString from "./get-regex-manager-string/index.js";
3
3
  export default function () {
4
4
  return deepmerge({
5
- extends: [':semanticCommits', ':semanticPrefixFix'],
6
- gitIgnoredAuthors: ['actions@github.com'],
7
- 'github-actions': {
5
+ extends: [":semanticCommits", ":semanticPrefixFix"],
6
+ gitIgnoredAuthors: ["actions@github.com"],
7
+ "github-actions": {
8
8
  enabled: false
9
9
  },
10
- labels: ['maintenance'],
10
+ labels: ["maintenance"],
11
11
  lockFileMaintenance: {
12
12
  automerge: true,
13
13
  enabled: true,
14
14
  ...(this.config.isLockFileFixCommitType ? {} : {
15
- semanticCommitType: 'chore'
15
+ semanticCommitType: "chore"
16
16
  })
17
17
  },
18
- rangeStrategy: 'replace',
18
+ rangeStrategy: "replace",
19
19
  regexManagers: [{
20
- datasourceTemplate: 'github-tags',
20
+ datasourceTemplate: "github-tags",
21
21
  fileMatch: [String.raw`\.ts$`],
22
- matchStrings: [getRegexManagerString('gitHubAction', '(?<depName>.*?)@v(?<currentValue>.*?)')],
23
- versioningTemplate: 'npm'
22
+ matchStrings: [getRegexManagerString("gitHubAction", "(?<depName>.*?)@v(?<currentValue>.*?)")],
23
+ versioningTemplate: "npm"
24
24
  }, {
25
- datasourceTemplate: 'node-version',
26
- depNameTemplate: 'node',
25
+ datasourceTemplate: "node-version",
26
+ depNameTemplate: "node",
27
27
  fileMatch: [String.raw`\.ts$`],
28
- matchStrings: [getRegexManagerString('nodejsVersion', '(?<currentValue>.*?)')],
29
- versioningTemplate: 'node'
28
+ matchStrings: [getRegexManagerString("nodejsVersion", "(?<currentValue>.*?)")],
29
+ versioningTemplate: "node"
30
30
  }],
31
31
  semanticCommitScope: null
32
32
  }, this.config.renovateConfig || {});
@@ -1,21 +1,21 @@
1
- import defu from '@dword-design/defu';
1
+ import defu from "@dword-design/defu";
2
2
  export default function () {
3
3
  return defu(this.config.typescriptConfig, {
4
4
  compilerOptions: {
5
5
  declaration: true,
6
6
  esModuleInterop: true,
7
- module: 'ESNext',
8
- moduleResolution: 'bundler',
9
- outDir: 'dist',
7
+ module: "ESNext",
8
+ moduleResolution: "bundler",
9
+ outDir: "dist",
10
10
  ...(this.config.hasTypescriptConfigRootAlias && {
11
11
  paths: {
12
- '@/*': ['./*']
12
+ "@/*": ["./*"]
13
13
  }
14
14
  }),
15
15
  skipLibCheck: true,
16
- target: 'ESNext'
16
+ target: "ESNext"
17
17
  },
18
- exclude: ['**/*.spec.ts'],
19
- include: ['src']
18
+ exclude: ["**/*.spec.ts"],
19
+ include: ["src"]
20
20
  });
21
21
  }