From cdae1f262958af11d621d4289645e34dc9b10716 Mon Sep 17 00:00:00 2001 From: gonzaloriestra <14979109+gonzaloriestra@users.noreply.github.com> Date: Thu, 4 Jun 2026 00:47:48 +0000 Subject: [PATCH 1/3] [Refactor] Use uniq helper in info service Replace manual Set usage with the uniq helper from @shopify/cli-kit/common/array in the info service. --- packages/app/src/cli/services/info.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/app/src/cli/services/info.ts b/packages/app/src/cli/services/info.ts index 3230ea2ae29..b84d28ab2b4 100644 --- a/packages/app/src/cli/services/info.ts +++ b/packages/app/src/cli/services/info.ts @@ -16,6 +16,7 @@ import { } from '@shopify/cli-kit/node/output' import {AlertCustomSection, InlineToken} from '@shopify/cli-kit/node/ui' import {CLI_KIT_VERSION} from '@shopify/cli-kit/common/version' +import {uniq} from '@shopify/cli-kit/common/array' export type Format = 'json' | 'text' export interface InfoOptions { @@ -230,7 +231,7 @@ class AppInfo { extensionsSections(): AlertCustomSection[] { const extensions = this.app.allExtensions.filter((ext) => ext.isReturnedAsInfo()) - const types = Array.from(new Set(extensions.map((ext) => ext.type))) + const types = uniq(extensions.map((ext) => ext.type)) return types .map((extensionType: string): AlertCustomSection | undefined => { const relevantExtensions = extensions.filter((extension: ExtensionInstance) => extension.type === extensionType) From b975f5ae2b65f1cafdfbfcfdbf9915899835a827 Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Fri, 5 Jun 2026 06:49:00 +0300 Subject: [PATCH 2/3] Remove typedoc from cli-kit; drop unused API-docs generation Co-Authored-By: Claude --- .github/workflows/pages.yml | 3 - package.json | 5 - packages/cli-kit/package.json | 5 +- packages/cli-kit/project.json | 20 ---- packages/cli-kit/scripts/build-api-docs.js | 28 ----- pnpm-lock.yaml | 131 --------------------- 6 files changed, 1 insertion(+), 191 deletions(-) delete mode 100644 packages/cli-kit/scripts/build-api-docs.js diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 2a9d7520cb5..0114b80b236 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -4,7 +4,6 @@ on: push: branches: [ "main" ] paths: - - packages/cli-kit/package.json - "docs/**" workflow_dispatch: @@ -38,8 +37,6 @@ jobs: uses: ./.github/actions/setup-cli-deps with: node-version: "22" - - name: Build TSDoc docs - run: pnpm build-api-docs --output-style=stream - name: Build Markdown files into HTML uses: actions/jekyll-build-pages@v1 with: diff --git a/package.json b/package.json index 20bed9b068a..e2dfefa6632 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "type": "module", "packageManager": "pnpm@10.11.1", "scripts": { - "build-api-docs": "nx run-many --target=build-api-docs --all --skip-nx-cache", "build-dev-docs": "pnpm shopify docs generate && sh ./bin/docs/build-dev-docs.sh", "build:affected": "nx affected --target=build", "build": "nx run-many --target=build --all --skip-nx-cache", @@ -168,7 +167,6 @@ "configurations/vite.config.ts", "docs-shopify.dev/**/*.ts", "vite.config.ts", - "docs/api/cli-kit/**/*.js", "graphql.config.ts" ], "ignoreBinaries": [ @@ -308,9 +306,6 @@ "**/graphql/**/generated/*.ts" ], "project": "**/*.{ts,tsx}!", - "ignoreBinaries": [ - "open" - ], "ignoreDependencies": [ "@graphql-typed-document-node/core" ], diff --git a/packages/cli-kit/package.json b/packages/cli-kit/package.json index 1725431d06d..2f6ba3aacb0 100644 --- a/packages/cli-kit/package.json +++ b/packages/cli-kit/package.json @@ -51,8 +51,6 @@ "scripts": { "build": "nx build", "clean": "nx clean", - "build-api-docs": "nx build-api-docs", - "open-api-docs": "nx open-api-docs", "lint": "nx lint", "lint:fix": "nx lint:fix", "prepack": "NODE_ENV=production pnpm nx build && cp ../../README.md README.md", @@ -170,8 +168,7 @@ "@vitest/coverage-istanbul": "^3.1.4", "msw": "^2.7.1", "node-stream-zip": "^1.15.0", - "ts-morph": "^17.0.1", - "typedoc": "^0.28.17" + "ts-morph": "^17.0.1" }, "engines": { "node": ">=22.12.0" diff --git a/packages/cli-kit/project.json b/packages/cli-kit/project.json index f382e2ebafb..77857df689f 100644 --- a/packages/cli-kit/project.json +++ b/packages/cli-kit/project.json @@ -42,26 +42,6 @@ "command": "node bin/update-cli-kit-version.js" } }, - "build-api-docs": { - "executor": "nx:run-commands", - "outputs": [ - "{workspaceRoot}/docs" - ], - "options": { - "command": "node ./scripts/build-api-docs.js", - "cwd": "packages/cli-kit" - } - }, - "open-api-docs": { - "executor": "nx:run-commands", - "dependsOn": [ - "build-api-docs" - ], - "options": { - "command": "open ../../docs/api/cli-kit/index.html", - "cwd": "packages/cli-kit" - } - }, "lint": { "executor": "nx:run-commands", "options": { diff --git a/packages/cli-kit/scripts/build-api-docs.js b/packages/cli-kit/scripts/build-api-docs.js deleted file mode 100644 index 476823a0775..00000000000 --- a/packages/cli-kit/scripts/build-api-docs.js +++ /dev/null @@ -1,28 +0,0 @@ -import glob from 'fast-glob' -import {fileURLToPath} from 'url' -import path from 'node:path' -import {Application as TypeDocApp} from 'typedoc' - -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) - -async function main() { - const cliKitRoot = path.join(__dirname, '..') - const entryPoints = (await glob('src/public/**/*.(ts|tsx)', {cwd: cliKitRoot})) - .filter((file) => !file.endsWith('.test.ts') && !file.endsWith('.test.tsx')) - - const app = await TypeDocApp.bootstrapWithPlugins({ - excludeExternals: true, - entryPoints, - readme: 'none', - }) - - const project = await app.convert() - // Project may not have converted correctly - if (project) { - const outputDir = path.join(__dirname, '../../../docs/api/cli-kit') - await app.generateDocs(project, outputDir) - } -} - -await main() diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6355cc39894..4be1654e7b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -499,9 +499,6 @@ importers: ts-morph: specifier: ^17.0.1 version: 17.0.1 - typedoc: - specifier: ^0.28.17 - version: 0.28.17(typescript@5.9.3) packages/create-app: dependencies: @@ -2415,9 +2412,6 @@ packages: '@fastify/busboy@3.2.0': resolution: {integrity: sha512-m9FVDXU3GT2ITSe0UaMA5rU3QkfC/UXtCU8y0gSN/GugTqtVldOBWIB5V6V3sbmenVZUIpU6f+mPEO2+m5iTaA==} - '@gerrit0/mini-shiki@3.23.0': - resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} - '@graphql-codegen/add@6.0.0': resolution: {integrity: sha512-biFdaURX0KTwEJPQ1wkT6BRgNasqgQ5KbCI1a3zwtLtO7XTo7/vKITPylmiU27K5DSOWYnY/1jfSqUAEBuhZrQ==} engines: {node: '>=16'} @@ -3710,21 +3704,6 @@ packages: cpu: [x64] os: [win32] - '@shikijs/engine-oniguruma@3.23.0': - resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} - - '@shikijs/langs@3.23.0': - resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} - - '@shikijs/themes@3.23.0': - resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} - - '@shikijs/types@3.23.0': - resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} - - '@shikijs/vscode-textmate@10.0.2': - resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} - '@shopify/cli-hydrogen@11.1.10': resolution: {integrity: sha512-MEnTbWVeNMeV/0dawod4y2AuhhFFLlwpaYzbaqQXJ2HMm20g+bPoOogqSnGF04DoySIT9nEVXI9CXm/TgBsvoA==} engines: {node: ^20 || ^22 || ^24} @@ -4147,9 +4126,6 @@ packages: '@types/gradient-string@1.1.6': resolution: {integrity: sha512-LkaYxluY4G5wR1M4AKQUal2q61Di1yVVCw42ImFTuaIoQVgmV0WP1xUaLB8zwb47mp82vWTpePI9JmrjEnJ7nQ==} - '@types/hast@3.0.4': - resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-cache-semantics@4.2.0': resolution: {integrity: sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==} @@ -4219,9 +4195,6 @@ packages: '@types/tinycolor2@1.4.6': resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} - '@types/unist@3.0.3': - resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@types/which@3.0.4': resolution: {integrity: sha512-liyfuo/106JdlgSchJzXEQCVArk0CvevqPote8F8HgWgJ3dRCcTHgJIsLDuee0kxk/mhbInzIZk3QWSZJ8R+2w==} @@ -5475,10 +5448,6 @@ packages: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - entities@6.0.1: resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} engines: {node: '>=0.12'} @@ -6913,9 +6882,6 @@ packages: resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - liquidjs@10.26.0: resolution: {integrity: sha512-Ub9FFNOLB9tdH/gB2MKkeU7x9NifoVidxAam6YWU7LUcy7Glumi6q5C3tDpWOEpeNaT8Cdwdb1axEdlvLSoyaQ==} engines: {node: '>=16'} @@ -7019,9 +6985,6 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lunr@2.3.9: - resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==, tarball: https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz} hasBin: true @@ -7054,10 +7017,6 @@ packages: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} - markdown-it@14.1.1: - resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==} - hasBin: true - matcher@3.0.0: resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} engines: {node: '>=10'} @@ -7073,9 +7032,6 @@ packages: mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==, tarball: https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz} - mdurl@2.0.0: - resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - meow@6.1.1: resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} engines: {node: '>=8'} @@ -7827,10 +7783,6 @@ packages: pumpify@1.5.1: resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} - punycode.js@2.3.1: - resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} - engines: {node: '>=6'} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -8759,13 +8711,6 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typedoc@0.28.17: - resolution: {integrity: sha512-ZkJ2G7mZrbxrKxinTQMjFqsCoYY6a5Luwv2GKbTnBCEgV2ihYm5CflA9JnJAwH0pZWavqfYxmDkFHPt4yx2oDQ==} - engines: {node: '>= 18', pnpm: '>= 10'} - hasBin: true - peerDependencies: - typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x - typescript-eslint@8.56.1: resolution: {integrity: sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -8790,9 +8735,6 @@ packages: resolution: {integrity: sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug==} hasBin: true - uc.micro@2.1.0: - resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - ufo@1.6.3: resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} @@ -9168,11 +9110,6 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yaml@2.8.2: - resolution: {integrity: sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==} - engines: {node: '>= 14.6'} - hasBin: true - yaml@2.8.3: resolution: {integrity: sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==} engines: {node: '>= 14.6'} @@ -11238,14 +11175,6 @@ snapshots: '@fastify/busboy@3.2.0': {} - '@gerrit0/mini-shiki@3.23.0': - dependencies: - '@shikijs/engine-oniguruma': 3.23.0 - '@shikijs/langs': 3.23.0 - '@shikijs/themes': 3.23.0 - '@shikijs/types': 3.23.0 - '@shikijs/vscode-textmate': 10.0.2 - '@graphql-codegen/add@6.0.0(graphql@16.10.0)': dependencies: '@graphql-codegen/plugin-helpers': 6.1.0(graphql@16.10.0) @@ -12895,26 +12824,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.59.0': optional: true - '@shikijs/engine-oniguruma@3.23.0': - dependencies: - '@shikijs/types': 3.23.0 - '@shikijs/vscode-textmate': 10.0.2 - - '@shikijs/langs@3.23.0': - dependencies: - '@shikijs/types': 3.23.0 - - '@shikijs/themes@3.23.0': - dependencies: - '@shikijs/types': 3.23.0 - - '@shikijs/types@3.23.0': - dependencies: - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - - '@shikijs/vscode-textmate@10.0.2': {} - '@shopify/cli-hydrogen@11.1.10(@graphql-codegen/cli@6.0.1(@parcel/watcher@2.5.6)(@types/node@18.19.70)(crossws@0.3.5)(graphql@16.10.0)(typescript@5.9.3))(graphql-config@5.1.5(@types/node@22.19.17)(crossws@0.3.5)(graphql@16.10.0)(typescript@5.9.3))(graphql@16.10.0)(react-dom@19.2.4(react@18.3.1))(react@18.3.1)(vite@6.4.1(@types/node@22.19.17)(jiti@2.6.1)(sass@1.97.3)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@ast-grep/napi': 0.34.1 @@ -13615,10 +13524,6 @@ snapshots: dependencies: '@types/tinycolor2': 1.4.6 - '@types/hast@3.0.4': - dependencies: - '@types/unist': 3.0.3 - '@types/http-cache-semantics@4.2.0': {} '@types/json-schema@7.0.15': {} @@ -13680,8 +13585,6 @@ snapshots: '@types/tinycolor2@1.4.6': {} - '@types/unist@3.0.3': {} - '@types/which@3.0.4': {} '@types/wrap-ansi@3.0.0': {} @@ -15032,8 +14935,6 @@ snapshots: ansi-colors: 4.1.3 strip-ansi: 6.0.1 - entities@4.5.0: {} - entities@6.0.1: {} entities@8.0.0: @@ -16792,10 +16693,6 @@ snapshots: lines-and-columns@2.0.3: {} - linkify-it@5.0.0: - dependencies: - uc.micro: 2.1.0 - liquidjs@10.26.0: dependencies: commander: 10.0.1 @@ -16889,8 +16786,6 @@ snapshots: dependencies: yallist: 3.1.1 - lunr@2.3.9: {} - lz-string@1.5.0: {} macaddress@0.5.3: {} @@ -16917,15 +16812,6 @@ snapshots: map-obj@4.3.0: {} - markdown-it@14.1.1: - dependencies: - argparse: 2.0.1 - entities: 4.5.0 - linkify-it: 5.0.0 - mdurl: 2.0.0 - punycode.js: 2.3.1 - uc.micro: 2.1.0 - matcher@3.0.0: dependencies: escape-string-regexp: 4.0.0 @@ -16939,8 +16825,6 @@ snapshots: mdn-data@2.27.1: optional: true - mdurl@2.0.0: {} - meow@6.1.1: dependencies: '@types/minimist': 1.2.5 @@ -17837,8 +17721,6 @@ snapshots: inherits: 2.0.4 pump: 2.0.1 - punycode.js@2.3.1: {} - punycode@2.3.1: {} qrcode.react@4.2.0(react@18.3.1): @@ -18871,15 +18753,6 @@ snapshots: typedarray@0.0.6: {} - typedoc@0.28.17(typescript@5.9.3): - dependencies: - '@gerrit0/mini-shiki': 3.23.0 - lunr: 2.3.9 - markdown-it: 14.1.1 - minimatch: 9.0.8 - typescript: 5.9.3 - yaml: 2.8.2 - typescript-eslint@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3): dependencies: '@typescript-eslint/eslint-plugin': 8.56.1(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3) @@ -18899,8 +18772,6 @@ snapshots: ua-parser-js@1.0.41: {} - uc.micro@2.1.0: {} - ufo@1.6.3: {} unbox-primitive@1.1.0: @@ -19357,8 +19228,6 @@ snapshots: yaml@2.8.0: {} - yaml@2.8.2: {} - yaml@2.8.3: {} yargs-parser@18.1.3: From 33a59c4c9cdf81efaf59502cb30edf9daf2571dd Mon Sep 17 00:00:00 2001 From: Ariel Caplan Date: Sun, 7 Jun 2026 17:43:24 +0300 Subject: [PATCH 3/3] Keep cli-kit API docs; install typedoc just-in-time in CI The previous commit removed typedoc and the API-docs generation on the assumption the generated docs were unused. They are not: the cli-kit API reference at https://shopify.github.io/cli/api/cli-kit/ is generated at GitHub Pages deploy time (docs/api is gitignored, never committed) and redeployed on every push to docs/** and cli-kit/package.json. Removing the "Build TSDoc docs" step would have silently 404'd a live, search-indexed artifact on the next Pages run. Instead of dropping the docs, take typedoc out of cli-kit's tracked devDependencies (the source of Dependabot churn) and install it just-in-time in the Pages job. It's committed nowhere, so Dependabot can't see it, and it's left unpinned so docs track the latest typedoc and stay compatible with the repo's TypeScript automatically. Also: - Restore build-api-docs (script, nx target, package scripts, knip entry). - Drop the open-api-docs convenience target: nothing invokes it and it only worked with typedoc installed locally. - Link the API reference from docs/README.md so it's no longer orphaned from the docs site navigation. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/pages.yml | 10 ++++++++ docs/README.md | 1 + package.json | 5 +++- packages/cli-kit/package.json | 1 + packages/cli-kit/project.json | 10 ++++++++ packages/cli-kit/scripts/build-api-docs.js | 28 ++++++++++++++++++++++ 6 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 packages/cli-kit/scripts/build-api-docs.js diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 0114b80b236..80d2f6aca07 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -4,6 +4,7 @@ on: push: branches: [ "main" ] paths: + - packages/cli-kit/package.json - "docs/**" workflow_dispatch: @@ -37,6 +38,15 @@ jobs: uses: ./.github/actions/setup-cli-deps with: node-version: "22" + # typedoc is needed only to generate the cli-kit API docs published to + # GitHub Pages. It's installed here just-in-time rather than tracked as a + # cli-kit devDependency so it doesn't generate Dependabot churn. Left + # unpinned so docs track the latest typedoc (and stay compatible with the + # repo's TypeScript) automatically; nothing here is committed. + - name: Install typedoc (docs generation only) + run: pnpm --filter @shopify/cli-kit add --save-dev typedoc + - name: Build TSDoc docs + run: pnpm build-api-docs --output-style=stream - name: Build Markdown files into HTML uses: actions/jekyll-build-pages@v1 with: diff --git a/docs/README.md b/docs/README.md index 5e6e3c44c9b..8cb9455aa23 100644 --- a/docs/README.md +++ b/docs/README.md @@ -26,6 +26,7 @@ The list below contains valuable resources for people interested in contributing The [`@shopify/cli-kit`](https://www.npmjs.com/package/@shopify/cli-kit) NPM package provides utilities to abstract away interactions with the Shopify platform (e.g., authentication, API requests) and ensures experiences are consistent across the board. If you are creating a new plugin or contributing to an existing one, we recommend checking out the following resources: +- [API reference](https://shopify.github.io/cli/api/cli-kit/) - [Creating a new command or flag](cli-kit/command-guidelines.md) - [Content and UI guidelines](cli-kit/ui-kit/guidelines.md) - [Using UI Kit](cli-kit/ui-kit/readme.md) diff --git a/package.json b/package.json index e2dfefa6632..b9096960265 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "type": "module", "packageManager": "pnpm@10.11.1", "scripts": { + "build-api-docs": "nx run-many --target=build-api-docs --all --skip-nx-cache", "build-dev-docs": "pnpm shopify docs generate && sh ./bin/docs/build-dev-docs.sh", "build:affected": "nx affected --target=build", "build": "nx run-many --target=build --all --skip-nx-cache", @@ -167,6 +168,7 @@ "configurations/vite.config.ts", "docs-shopify.dev/**/*.ts", "vite.config.ts", + "docs/api/cli-kit/**/*.js", "graphql.config.ts" ], "ignoreBinaries": [ @@ -307,7 +309,8 @@ ], "project": "**/*.{ts,tsx}!", "ignoreDependencies": [ - "@graphql-typed-document-node/core" + "@graphql-typed-document-node/core", + "typedoc" ], "vite": { "config": [ diff --git a/packages/cli-kit/package.json b/packages/cli-kit/package.json index 2f6ba3aacb0..b0cbc51566e 100644 --- a/packages/cli-kit/package.json +++ b/packages/cli-kit/package.json @@ -51,6 +51,7 @@ "scripts": { "build": "nx build", "clean": "nx clean", + "build-api-docs": "nx build-api-docs", "lint": "nx lint", "lint:fix": "nx lint:fix", "prepack": "NODE_ENV=production pnpm nx build && cp ../../README.md README.md", diff --git a/packages/cli-kit/project.json b/packages/cli-kit/project.json index 77857df689f..e9b6854df80 100644 --- a/packages/cli-kit/project.json +++ b/packages/cli-kit/project.json @@ -42,6 +42,16 @@ "command": "node bin/update-cli-kit-version.js" } }, + "build-api-docs": { + "executor": "nx:run-commands", + "outputs": [ + "{workspaceRoot}/docs" + ], + "options": { + "command": "node ./scripts/build-api-docs.js", + "cwd": "packages/cli-kit" + } + }, "lint": { "executor": "nx:run-commands", "options": { diff --git a/packages/cli-kit/scripts/build-api-docs.js b/packages/cli-kit/scripts/build-api-docs.js new file mode 100644 index 00000000000..476823a0775 --- /dev/null +++ b/packages/cli-kit/scripts/build-api-docs.js @@ -0,0 +1,28 @@ +import glob from 'fast-glob' +import {fileURLToPath} from 'url' +import path from 'node:path' +import {Application as TypeDocApp} from 'typedoc' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +async function main() { + const cliKitRoot = path.join(__dirname, '..') + const entryPoints = (await glob('src/public/**/*.(ts|tsx)', {cwd: cliKitRoot})) + .filter((file) => !file.endsWith('.test.ts') && !file.endsWith('.test.tsx')) + + const app = await TypeDocApp.bootstrapWithPlugins({ + excludeExternals: true, + entryPoints, + readme: 'none', + }) + + const project = await app.convert() + // Project may not have converted correctly + if (project) { + const outputDir = path.join(__dirname, '../../../docs/api/cli-kit') + await app.generateDocs(project, outputDir) + } +} + +await main()