create-typescript-app 1.67.0 → 1.67.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.
@@ -4,7 +4,7 @@ function createCleanupCommands({
4
4
  }) {
5
5
  return [
6
6
  // There's no need to dedupe when initializing from the fixed template
7
- ...mode === "initialize" ? [] : ["pnpm dedupe"],
7
+ ...mode === "initialize" ? [] : ["pnpm dedupe --offline"],
8
8
  // n/no-missing-import rightfully reports on a missing the bin .js file
9
9
  ...bin ? ["pnpm build"] : [],
10
10
  "pnpm lint --fix",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/shared/createCleanupCommands.ts"],"sourcesContent":["import { Options } from \"./types.js\";\n\nexport function createCleanupCommands({\n\tbin,\n\tmode,\n}: Pick<Options, \"bin\" | \"mode\">) {\n\treturn [\n\t\t// There's no need to dedupe when initializing from the fixed template\n\t\t...(mode === \"initialize\" ? [] : [\"pnpm dedupe\"]),\n\t\t// n/no-missing-import rightfully reports on a missing the bin .js file\n\t\t...(bin ? [\"pnpm build\"] : []),\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t];\n}\n"],"mappings":"AAEO,SAAS,sBAAsB;AAAA,EACrC;AAAA,EACA;AACD,GAAkC;AACjC,SAAO;AAAA;AAAA,IAEN,GAAI,SAAS,eAAe,CAAC,IAAI,CAAC,aAAa;AAAA;AAAA,IAE/C,GAAI,MAAM,CAAC,YAAY,IAAI,CAAC;AAAA,IAC5B;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/shared/createCleanupCommands.ts"],"sourcesContent":["import { Options } from \"./types.js\";\n\nexport function createCleanupCommands({\n\tbin,\n\tmode,\n}: Pick<Options, \"bin\" | \"mode\">) {\n\treturn [\n\t\t// There's no need to dedupe when initializing from the fixed template\n\t\t...(mode === \"initialize\" ? [] : [\"pnpm dedupe --offline\"]),\n\t\t// n/no-missing-import rightfully reports on a missing the bin .js file\n\t\t...(bin ? [\"pnpm build\"] : []),\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t];\n}\n"],"mappings":"AAEO,SAAS,sBAAsB;AAAA,EACrC;AAAA,EACA;AACD,GAAkC;AACjC,SAAO;AAAA;AAAA,IAEN,GAAI,SAAS,eAAe,CAAC,IAAI,CAAC,uBAAuB;AAAA;AAAA,IAEzD,GAAI,MAAM,CAAC,YAAY,IAAI,CAAC;AAAA,IAC5B;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
@@ -112,12 +112,11 @@ declare const optionsSchema: z.ZodObject<{
112
112
  skipUninstall: z.ZodOptional<z.ZodBoolean>;
113
113
  title: z.ZodOptional<z.ZodString>;
114
114
  }, "strip", z.ZodTypeAny, {
115
- mode?: "create" | "initialize" | "migrate" | undefined;
116
- auto?: boolean | undefined;
117
- offline?: boolean | undefined;
118
115
  description?: string | undefined;
116
+ offline?: boolean | undefined;
119
117
  access?: "public" | "restricted" | undefined;
120
118
  author?: string | undefined;
119
+ auto?: boolean | undefined;
121
120
  base?: "common" | "everything" | "minimal" | "prompt" | undefined;
122
121
  bin?: string | undefined;
123
122
  directory?: string | undefined;
@@ -129,6 +128,7 @@ declare const optionsSchema: z.ZodObject<{
129
128
  guide?: string | undefined;
130
129
  keywords?: string[] | undefined;
131
130
  logo?: string | undefined;
131
+ mode?: "create" | "initialize" | "migrate" | undefined;
132
132
  owner?: string | undefined;
133
133
  repository?: string | undefined;
134
134
  title?: string | undefined;
@@ -161,12 +161,11 @@ declare const optionsSchema: z.ZodObject<{
161
161
  guideTitle?: string | undefined;
162
162
  logoAlt?: string | undefined;
163
163
  }, {
164
- mode?: "create" | "initialize" | "migrate" | undefined;
165
- auto?: boolean | undefined;
166
- offline?: boolean | undefined;
167
164
  description?: string | undefined;
165
+ offline?: boolean | undefined;
168
166
  access?: "public" | "restricted" | undefined;
169
167
  author?: string | undefined;
168
+ auto?: boolean | undefined;
170
169
  base?: "common" | "everything" | "minimal" | "prompt" | undefined;
171
170
  bin?: string | undefined;
172
171
  directory?: string | undefined;
@@ -178,6 +177,7 @@ declare const optionsSchema: z.ZodObject<{
178
177
  guide?: string | undefined;
179
178
  keywords?: string[] | undefined;
180
179
  logo?: string | undefined;
180
+ mode?: "create" | "initialize" | "migrate" | undefined;
181
181
  owner?: string | undefined;
182
182
  repository?: string | undefined;
183
183
  title?: string | undefined;
@@ -53,7 +53,7 @@ async function finalizeDependencies(options) {
53
53
  "-D"
54
54
  );
55
55
  }
56
- await execaCommand(`pnpm dedupe`);
56
+ await execaCommand(`pnpm dedupe --offline`);
57
57
  }
58
58
  export {
59
59
  finalizeDependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@eslint/js\",\n\t\t\"@eslint-community/eslint-plugin-eslint-comments\",\n\t\t\"@types/eslint-plugin-markdown\",\n\t\t\"@types/eslint__js\",\n\t\t\"@types/node\",\n\t\t\"eslint\",\n\t\t\"eslint-plugin-jsdoc\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint-plugin-regexp\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-sh\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"tsup\",\n\t\t\"typescript\",\n\t\t\"typescript-eslint\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintJson ? [] : [\"eslint-plugin-jsonc\"]),\n\t\t...(options.excludeLintJson && options.excludeLintPackageJson\n\t\t\t? []\n\t\t\t: [\"jsonc-eslint-parser\"]),\n\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t...(options.excludeLintMd\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"eslint-plugin-markdown\",\n\t\t\t\t\t\"markdownlint\",\n\t\t\t\t\t\"markdownlint-cli\",\n\t\t\t\t\t\"sentences-per-line\",\n\t\t\t\t]),\n\t\t...(options.excludeLintPackageJson ? [] : [\"eslint-plugin-package-json\"]),\n\t\t...(options.excludeLintPerfectionist\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-perfectionist\"]),\n\t\t...(options.excludeLintSpelling ? [] : [\"cspell\"]),\n\t\t...(options.excludeLintYml ? [] : [\"eslint-plugin-yml\"]),\n\t\t...(options.excludeReleases\n\t\t\t? []\n\t\t\t: [\"@release-it/conventional-changelog\", \"release-it\"]),\n\t\t...(options.excludeTests\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\"eslint-plugin-vitest\",\n\t\t\t\t\t\"vitest\",\n\t\t\t\t]),\n\t]\n\t\t.filter(Boolean)\n\t\t.sort()\n\t\t.map((packageName) => `${packageName}@latest`)\n\t\t.join(\" \");\n\n\tawait execaCommand(\n\t\t`pnpm add ${devDependencies} -D${options.offline ? \" --offline\" : \"\"}`,\n\t);\n\n\tif (!options.excludeAllContributors) {\n\t\tawait execaCommand(`npx all-contributors-cli generate`);\n\t\tawait removeDependencies(\n\t\t\t[\"all-contributors-cli\", \"all-contributors-for-repository\"],\n\t\t\t(await readPackageData()).devDependencies,\n\t\t\t\"-D\",\n\t\t);\n\t}\n\n\tawait execaCommand(`pnpm dedupe`);\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,0BAA0B;AAGpD,eAAsB,qBAAqB,SAAkB;AAC5D,QAAM,kBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,sBAAsB;AAAA,IACjE,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,qBAAqB;AAAA,IACzD,GAAI,QAAQ,mBAAmB,QAAQ,yBACpC,CAAC,IACD,CAAC,qBAAqB;AAAA,IACzB,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,MAAM;AAAA,IAC1C,GAAI,QAAQ,gBACT,CAAC,IACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACF,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,4BAA4B;AAAA,IACvE,GAAI,QAAQ,2BACT,CAAC,IACD,CAAC,6BAA6B;AAAA,IACjC,GAAI,QAAQ,sBAAsB,CAAC,IAAI,CAAC,QAAQ;AAAA,IAChD,GAAI,QAAQ,iBAAiB,CAAC,IAAI,CAAC,mBAAmB;AAAA,IACtD,GAAI,QAAQ,kBACT,CAAC,IACD,CAAC,sCAAsC,YAAY;AAAA,IACtD,GAAI,QAAQ,eACT,CAAC,IACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACH,EACE,OAAO,OAAO,EACd,KAAK,EACL,IAAI,CAAC,gBAAgB,GAAG,WAAW,SAAS,EAC5C,KAAK,GAAG;AAEV,QAAM;AAAA,IACL,YAAY,eAAe,MAAM,QAAQ,UAAU,eAAe,EAAE;AAAA,EACrE;AAEA,MAAI,CAAC,QAAQ,wBAAwB;AACpC,UAAM,aAAa,mCAAmC;AACtD,UAAM;AAAA,MACL,CAAC,wBAAwB,iCAAiC;AAAA,OACzD,MAAM,gBAAgB,GAAG;AAAA,MAC1B;AAAA,IACD;AAAA,EACD;AAEA,QAAM,aAAa,aAAa;AACjC;","names":[]}
1
+ {"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@eslint/js\",\n\t\t\"@eslint-community/eslint-plugin-eslint-comments\",\n\t\t\"@types/eslint-plugin-markdown\",\n\t\t\"@types/eslint__js\",\n\t\t\"@types/node\",\n\t\t\"eslint\",\n\t\t\"eslint-plugin-jsdoc\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint-plugin-regexp\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-sh\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"tsup\",\n\t\t\"typescript\",\n\t\t\"typescript-eslint\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintJson ? [] : [\"eslint-plugin-jsonc\"]),\n\t\t...(options.excludeLintJson && options.excludeLintPackageJson\n\t\t\t? []\n\t\t\t: [\"jsonc-eslint-parser\"]),\n\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t...(options.excludeLintMd\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"eslint-plugin-markdown\",\n\t\t\t\t\t\"markdownlint\",\n\t\t\t\t\t\"markdownlint-cli\",\n\t\t\t\t\t\"sentences-per-line\",\n\t\t\t\t]),\n\t\t...(options.excludeLintPackageJson ? [] : [\"eslint-plugin-package-json\"]),\n\t\t...(options.excludeLintPerfectionist\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-perfectionist\"]),\n\t\t...(options.excludeLintSpelling ? [] : [\"cspell\"]),\n\t\t...(options.excludeLintYml ? [] : [\"eslint-plugin-yml\"]),\n\t\t...(options.excludeReleases\n\t\t\t? []\n\t\t\t: [\"@release-it/conventional-changelog\", \"release-it\"]),\n\t\t...(options.excludeTests\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\"eslint-plugin-vitest\",\n\t\t\t\t\t\"vitest\",\n\t\t\t\t]),\n\t]\n\t\t.filter(Boolean)\n\t\t.sort()\n\t\t.map((packageName) => `${packageName}@latest`)\n\t\t.join(\" \");\n\n\tawait execaCommand(\n\t\t`pnpm add ${devDependencies} -D${options.offline ? \" --offline\" : \"\"}`,\n\t);\n\n\tif (!options.excludeAllContributors) {\n\t\tawait execaCommand(`npx all-contributors-cli generate`);\n\t\tawait removeDependencies(\n\t\t\t[\"all-contributors-cli\", \"all-contributors-for-repository\"],\n\t\t\t(await readPackageData()).devDependencies,\n\t\t\t\"-D\",\n\t\t);\n\t}\n\n\tawait execaCommand(`pnpm dedupe --offline`);\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,0BAA0B;AAGpD,eAAsB,qBAAqB,SAAkB;AAC5D,QAAM,kBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,sBAAsB;AAAA,IACjE,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,qBAAqB;AAAA,IACzD,GAAI,QAAQ,mBAAmB,QAAQ,yBACpC,CAAC,IACD,CAAC,qBAAqB;AAAA,IACzB,GAAI,QAAQ,kBAAkB,CAAC,IAAI,CAAC,MAAM;AAAA,IAC1C,GAAI,QAAQ,gBACT,CAAC,IACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACF,GAAI,QAAQ,yBAAyB,CAAC,IAAI,CAAC,4BAA4B;AAAA,IACvE,GAAI,QAAQ,2BACT,CAAC,IACD,CAAC,6BAA6B;AAAA,IACjC,GAAI,QAAQ,sBAAsB,CAAC,IAAI,CAAC,QAAQ;AAAA,IAChD,GAAI,QAAQ,iBAAiB,CAAC,IAAI,CAAC,mBAAmB;AAAA,IACtD,GAAI,QAAQ,kBACT,CAAC,IACD,CAAC,sCAAsC,YAAY;AAAA,IACtD,GAAI,QAAQ,eACT,CAAC,IACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACH,EACE,OAAO,OAAO,EACd,KAAK,EACL,IAAI,CAAC,gBAAgB,GAAG,WAAW,SAAS,EAC5C,KAAK,GAAG;AAEV,QAAM;AAAA,IACL,YAAY,eAAe,MAAM,QAAQ,UAAU,eAAe,EAAE;AAAA,EACrE;AAEA,MAAI,CAAC,QAAQ,wBAAwB;AACpC,UAAM,aAAa,mCAAmC;AACtD,UAAM;AAAA,MACL,CAAC,wBAAwB,iCAAiC;AAAA,OACzD,MAAM,gBAAgB,GAAG;AAAA,MAC1B;AAAA,IACD;AAAA,EACD;AAEA,QAAM,aAAa,uBAAuB;AAC3C;","names":[]}
@@ -1,5 +1,9 @@
1
1
  import { existingBadgeMatcherCreators } from "./findExistingBadges.js";
2
2
  function findIntroSectionClose(contents) {
3
+ const projectLogoMatch = /<img align="right" alt="Project logo.+" src=".+">/.exec(contents);
4
+ if (projectLogoMatch) {
5
+ return contents.indexOf("\n", projectLogoMatch.index) + 2;
6
+ }
3
7
  const indexOfH2OrCodeBlock = contents.search(/## |<\s*h2|```/);
4
8
  if (indexOfH2OrCodeBlock !== -1) {
5
9
  return indexOfH2OrCodeBlock - 2;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/steps/writeReadme/findIntroSectionClose.ts"],"sourcesContent":["import { existingBadgeMatcherCreators } from \"./findExistingBadges.js\";\n\nexport function findIntroSectionClose(contents: string) {\n\t// Highest priority match: an h2, presumably following badges\n\tconst indexOfH2OrCodeBlock = contents.search(/## |<\\s*h2|```/);\n\n\tif (indexOfH2OrCodeBlock !== -1) {\n\t\treturn indexOfH2OrCodeBlock - 2;\n\t}\n\n\t// Failing that, if any badges are found, go after the last of them\n\tfor (const createMatcher of existingBadgeMatcherCreators) {\n\t\tconst lastMatch = [...contents.matchAll(createMatcher())].at(-1);\n\n\t\tif (lastMatch?.index) {\n\t\t\treturn lastMatch.index + lastMatch[0].length + 2;\n\t\t}\n\t}\n\n\t// Lastly, go for the second line altogether\n\treturn contents.indexOf(\"\\n\", 1) + 1;\n}\n"],"mappings":"AAAA,SAAS,oCAAoC;AAEtC,SAAS,sBAAsB,UAAkB;AAEvD,QAAM,uBAAuB,SAAS,OAAO,gBAAgB;AAE7D,MAAI,yBAAyB,IAAI;AAChC,WAAO,uBAAuB;AAAA,EAC/B;AAGA,aAAW,iBAAiB,8BAA8B;AACzD,UAAM,YAAY,CAAC,GAAG,SAAS,SAAS,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE;AAE/D,QAAI,WAAW,OAAO;AACrB,aAAO,UAAU,QAAQ,UAAU,CAAC,EAAE,SAAS;AAAA,IAChD;AAAA,EACD;AAGA,SAAO,SAAS,QAAQ,MAAM,CAAC,IAAI;AACpC;","names":[]}
1
+ {"version":3,"sources":["../../../src/steps/writeReadme/findIntroSectionClose.ts"],"sourcesContent":["import { existingBadgeMatcherCreators } from \"./findExistingBadges.js\";\n\nexport function findIntroSectionClose(contents: string) {\n\t// Highest priority: after an existing create-typescript-app-style logo\n\tconst projectLogoMatch =\n\t\t/<img align=\"right\" alt=\"Project logo.+\" src=\".+\">/.exec(contents);\n\tif (projectLogoMatch) {\n\t\treturn contents.indexOf(\"\\n\", projectLogoMatch.index) + 2;\n\t}\n\n\t// Next: before a first code block or h2, presumably following badges\n\tconst indexOfH2OrCodeBlock = contents.search(/## |<\\s*h2|```/);\n\n\tif (indexOfH2OrCodeBlock !== -1) {\n\t\treturn indexOfH2OrCodeBlock - 2;\n\t}\n\n\t// Failing those, if any badges are found, go after the last of them\n\tfor (const createMatcher of existingBadgeMatcherCreators) {\n\t\tconst lastMatch = [...contents.matchAll(createMatcher())].at(-1);\n\n\t\tif (lastMatch?.index) {\n\t\t\treturn lastMatch.index + lastMatch[0].length + 2;\n\t\t}\n\t}\n\n\t// Lastly, go for the second line altogether\n\treturn contents.indexOf(\"\\n\", 1) + 1;\n}\n"],"mappings":"AAAA,SAAS,oCAAoC;AAEtC,SAAS,sBAAsB,UAAkB;AAEvD,QAAM,mBACL,oDAAoD,KAAK,QAAQ;AAClE,MAAI,kBAAkB;AACrB,WAAO,SAAS,QAAQ,MAAM,iBAAiB,KAAK,IAAI;AAAA,EACzD;AAGA,QAAM,uBAAuB,SAAS,OAAO,gBAAgB;AAE7D,MAAI,yBAAyB,IAAI;AAChC,WAAO,uBAAuB;AAAA,EAC/B;AAGA,aAAW,iBAAiB,8BAA8B;AACzD,UAAM,YAAY,CAAC,GAAG,SAAS,SAAS,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE;AAE/D,QAAI,WAAW,OAAO;AACrB,aAAO,UAAU,QAAQ,UAAU,CAAC,EAAE,SAAS;AAAA,IAChD;AAAA,EACD;AAGA,SAAO,SAAS,QAAQ,MAAM,CAAC,IAAI;AACpC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "1.67.0",
3
+ "version": "1.67.2",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 💝",
5
5
  "repository": {
6
6
  "type": "git",