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 {
|
|
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
|
|
1
|
+
declare const startingOwnerContributions: string[];
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { startingOwnerContributions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inputFromFileJSON } from "input-from-file-json";
|
|
2
|
-
import {
|
|
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:
|
|
17
|
+
contributions: startingOwnerContributions,
|
|
18
18
|
login: user.login,
|
|
19
19
|
name: user.name,
|
|
20
20
|
profile: user.blog
|