Skip to content

Restore cli-kit root export#7746

Open
mojobeeping wants to merge 1 commit into
Shopify:mainfrom
mojobeeping:mojobeep/restore-cli-kit-root-export
Open

Restore cli-kit root export#7746
mojobeeping wants to merge 1 commit into
Shopify:mainfrom
mojobeeping:mojobeep/restore-cli-kit-root-export

Conversation

@mojobeeping

Copy link
Copy Markdown

What

Restores the missing @shopify/cli-kit root entry by adding packages/cli-kit/src/index.ts with the documented file and path namespaces.

The published @shopify/cli-kit@4.1.0 package still advertises:

  • exports["."].import = ./dist/index.js
  • exports["."].types = ./dist/index.d.ts
  • module = dist/index.js
  • types = dist/index.d.ts

but the tarball does not include dist/index.js or dist/index.d.ts, so import('@shopify/cli-kit') fails in a clean install.

This also re-adds the local TS path mapping for the root package and updates the testing-strategy docs sample to use the current filesystem/path helper names.

Reproduction

mkdir /tmp/cli-kit-root-repro
cd /tmp/cli-kit-root-repro
npm init -y
npm install --ignore-scripts @shopify/cli-kit@4.1.0
node -e "import('@shopify/cli-kit').catch(e => { console.error(e.code + ': ' + e.message); process.exit(1) })"

Current output:

ERR_MODULE_NOT_FOUND: Cannot find module '.../node_modules/@shopify/cli-kit/dist/index.js'

Validation

  • pnpm --filter @shopify/cli-kit vitest src/index.test.ts
  • pnpm --filter @shopify/cli-kit build
  • pnpm --filter @shopify/cli-kit lint
  • git diff --check
  • npm pack --ignore-scripts --json --pack-destination /tmp/mojobeep-shopify-cli-kit-patched-pack
  • Clean packed-tarball install: import('@shopify/cli-kit') exposes file.inTemporaryDirectory, file.writeFile, and path.joinPath
  • Clean packed-tarball TypeScript consumer with skipLibCheck: false and @types/react@19 resolves import {file, path} from '@shopify/cli-kit'

@mojobeeping mojobeeping requested a review from a team as a code owner June 8, 2026 05:31
@mojobeeping

Copy link
Copy Markdown
Author

I have signed the CLA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant