create-typescript-app 2.18.1 → 2.18.2

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.
@@ -1,6 +1,6 @@
1
1
  import _ from "lodash";
2
2
  import { base } from "../base.js";
3
- import { ownerContributions } from "../data/contributions.js";
3
+ import { startingOwnerContributions } from "../data/contributions.js";
4
4
  import { resolveUses } from "./actions/resolveUses.js";
5
5
  import { blockPrettier } from "./blockPrettier.js";
6
6
  import { blockREADME } from "./blockREADME.js";
@@ -13,6 +13,16 @@ const blockAllContributors = base.createBlock({
13
13
  },
14
14
  produce({ options }) {
15
15
  const contributions = options.contributors?.length;
16
+ const ownerContributions = Array.from(
17
+ new Set(
18
+ [
19
+ options.contributors?.find(
20
+ (contributor) => contributor.login.toLowerCase() === options.owner.toLowerCase()
21
+ )?.contributions,
22
+ startingOwnerContributions
23
+ ].filter(Boolean).flat()
24
+ )
25
+ );
16
26
  return {
17
27
  addons: [
18
28
  blockPrettier({
@@ -1,3 +1,3 @@
1
- declare const ownerContributions: string[];
1
+ declare const startingOwnerContributions: string[];
2
2
 
3
- export { ownerContributions };
3
+ export { startingOwnerContributions };
@@ -1,4 +1,4 @@
1
- const ownerContributions = [
1
+ const startingOwnerContributions = [
2
2
  "code",
3
3
  "content",
4
4
  "doc",
@@ -9,5 +9,5 @@ const ownerContributions = [
9
9
  "tool"
10
10
  ];
11
11
  export {
12
- ownerContributions
12
+ startingOwnerContributions
13
13
  };
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.18.0";
2
+ var version = "2.18.1";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -1,5 +1,5 @@
1
1
  import { inputFromFileJSON } from "input-from-file-json";
2
- import { ownerContributions } from "../data/contributions.js";
2
+ import { startingOwnerContributions } from "../data/contributions.js";
3
3
  import { inputFromOctokit } from "../inputs/inputFromOctokit.js";
4
4
  async function readAllContributors(take) {
5
5
  const contributions = await take(inputFromFileJSON, {
@@ -14,7 +14,7 @@ async function readAllContributors(take) {
14
14
  return user && [
15
15
  {
16
16
  avatar_url: user.avatar_url,
17
- contributions: ownerContributions,
17
+ contributions: startingOwnerContributions,
18
18
  login: user.login,
19
19
  name: user.name,
20
20
  profile: user.blog
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.18.1",
3
+ "version": "2.18.2",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",