create-typescript-app 2.22.6 → 2.22.8

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.
package/lib/base.js CHANGED
@@ -21,6 +21,7 @@ import { readFileSafe } from "./options/readFileSafe.js";
21
21
  import { readFunding } from "./options/readFunding.js";
22
22
  import { readGitDefaults } from "./options/readGitDefaults.js";
23
23
  import { readGuide } from "./options/readGuide.js";
24
+ import { readKeywords } from "./options/readKeywords.js";
24
25
  import { readLogo } from "./options/readLogo.js";
25
26
  import { readNode } from "./options/readNode.js";
26
27
  import { readNpmDefaults } from "./options/readNpmDefaults.js";
@@ -133,6 +134,9 @@ const base = createBase({
133
134
  getEmailFromNpm
134
135
  )
135
136
  );
137
+ const getKeywords = lazyValue(
138
+ async () => await readKeywords(getPackageData)
139
+ );
136
140
  const getEmailFromCodeOfConduct = lazyValue(
137
141
  async () => await readEmailFromCodeOfConduct(take)
138
142
  );
@@ -206,6 +210,7 @@ const base = createBase({
206
210
  explainer: getExplainer,
207
211
  funding: getFunding,
208
212
  guide: getGuide,
213
+ keywords: getKeywords,
209
214
  logo: getLogo,
210
215
  node: getNode,
211
216
  owner: getOwner,
@@ -55,9 +55,7 @@ const blockPackageJson = base.createBlock({
55
55
  "package.json",
56
56
  "README.md"
57
57
  ].filter(Boolean).sort(),
58
- keywords: options.keywords?.flatMap(
59
- (keyword) => keyword.split(/ /)
60
- ),
58
+ keywords: options.keywords,
61
59
  license: "MIT",
62
60
  name: options.repository,
63
61
  repository: {
@@ -1,3 +1,4 @@
1
+ import sortKeys from "sort-keys";
1
2
  import { CompilerOptionsSchema } from "zod-tsconfig";
2
3
  import { base } from "../base.js";
3
4
  import { getPackageDependencies } from "../data/packageData.js";
@@ -116,7 +117,7 @@ export * from "./types.js";
116
117
  ],
117
118
  files: {
118
119
  "tsconfig.json": JSON.stringify({
119
- compilerOptions: {
120
+ compilerOptions: sortKeys({
120
121
  declaration: true,
121
122
  declarationMap: true,
122
123
  esModuleInterop: true,
@@ -128,7 +129,7 @@ export * from "./types.js";
128
129
  strict: true,
129
130
  target: "ES2022",
130
131
  ...compilerOptions
131
- },
132
+ }),
132
133
  include: ["src"]
133
134
  })
134
135
  }
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.22.5";
2
+ var version = "2.22.7";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -0,0 +1,5 @@
1
+ import { PartialPackageData } from '../types.js';
2
+
3
+ declare function readKeywords(getPackageData: () => Promise<PartialPackageData>): Promise<string[] | undefined>;
4
+
5
+ export { readKeywords };
@@ -0,0 +1,7 @@
1
+ async function readKeywords(getPackageData) {
2
+ const { keywords } = await getPackageData();
3
+ return keywords && Array.from(new Set((await getPackageData()).keywords)).sort();
4
+ }
5
+ export {
6
+ readKeywords
7
+ };
package/lib/types.d.ts CHANGED
@@ -21,6 +21,7 @@ interface PartialPackageData {
21
21
  engines?: {
22
22
  node?: string;
23
23
  };
24
+ keywords?: string[];
24
25
  name?: string;
25
26
  packageManager?: string;
26
27
  publishConfig?: PartialPublishConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.22.6",
3
+ "version": "2.22.8",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",