Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ const config = [
},
},

// The theme package has tests that partially mock cli-kit with dynamic imports.
// Those mocks should not make every static cli-kit import in the package fail.
{
files: ['packages/theme/src/**/*.ts'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
checkDynamicDependenciesExceptions: ['@shopify/cli-kit/**'],
},
],
},
},

// JSDoc rules for public API files
{
files: ['**/public/**/*.ts'],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@
"graphql-tag": "^2.12.6",
"json-stringify-deterministic": "1.0.12",
"knip": "5.59.1",
"liquidjs": "10.26.0",
"liquidjs": "10.27.0",
"node-fetch": "^3.3.2",
"nx": "22.7.0",
"oclif": "4.23.0",
"octokit-plugin-create-pull-request": "^3.12.2",
"pathe": "1.1.1",
"pathe": "1.1.2",
"pin-github-action": "^3.3.1",
"rimraf": "^6.1.3",
"ts-node": "^10.9.1",
"typescript": "5.9.3",
"vitest": "^3.1.4",
"zod": "3.24.4"
"zod": "3.25.76"
},
"workspaces": {
"packages": [
Expand Down
8 changes: 4 additions & 4 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@
"dependencies": {
"@graphql-typed-document-node/core": "3.2.0",
"@luckycatfactory/esbuild-graphql-loader": "3.8.1",
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@shopify/cli-kit": "4.1.0",
"@shopify/plugin-cloudflare": "4.1.0",
"@shopify/organizations": "4.1.0",
"@shopify/polaris": "12.27.0",
"@shopify/polaris-icons": "8.11.1",
"@shopify/theme": "4.1.0",
"@shopify/theme-check-node": "3.25.0",
"@shopify/theme-check-node": "3.26.0",
"@shopify/toml-patch": "0.3.0",
"chokidar": "3.6.0",
"diff": "5.2.2",
"esbuild": "0.28.0",
"graphql-request": "6.1.0",
"h3": "1.15.9",
"h3": "1.15.11",
"http-proxy-node16": "1.0.6",
"ignore": "6.0.2",
"json-schema-to-typescript": "15.0.4",
Expand All @@ -82,7 +82,7 @@
"react": "19.2.4",
"react-dom": "19.2.4",
"which": "4.0.0",
"ws": "8.20.1"
"ws": "8.21.0"
},
"devDependencies": {
"@types/diff": "^5.0.3",
Expand Down
46 changes: 23 additions & 23 deletions packages/cli-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,68 +102,68 @@
]
},
"dependencies": {
"@apidevtools/json-schema-ref-parser": "11.7.3",
"@bugsnag/js": "8.6.0",
"@apidevtools/json-schema-ref-parser": "11.9.3",
"@bugsnag/js": "8.9.0",
"@graphql-typed-document-node/core": "3.2.0",
"@iarna/toml": "2.2.5",
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@shopify/toml-patch": "0.3.0",
"@opentelemetry/api": "1.9.0",
"@opentelemetry/core": "1.30.0",
"@opentelemetry/api": "1.9.1",
"@opentelemetry/core": "1.30.1",
"@opentelemetry/exporter-metrics-otlp-http": "0.57.0",
"@opentelemetry/resources": "1.30.0",
"@opentelemetry/sdk-metrics": "1.30.0",
"@opentelemetry/resources": "1.30.1",
"@opentelemetry/sdk-metrics": "1.30.1",
"@types/archiver": "5.3.2",
"ajv": "8.18.0",
"ajv": "8.20.0",
"ansi-escapes": "6.2.1",
"archiver": "5.3.2",
"bottleneck": "2.19.5",
"chalk": "5.4.1",
"chalk": "5.6.2",
"change-case": "4.1.2",
"color-json": "3.0.5",
"conf": "11.0.2",
"deepmerge": "4.3.1",
"dotenv": "16.4.7",
"dotenv": "16.6.1",
"env-paths": "3.0.0",
"execa": "7.2.0",
"fast-glob": "3.3.3",
"figures": "5.0.0",
"find-up": "6.3.0",
"form-data": "4.0.4",
"form-data": "4.0.5",
"fs-extra": "11.1.0",
"gradient-string": "2.0.2",
"graphql": "16.10.0",
"graphql-request": "6.1.0",
"ignore": "6.0.2",
"ink": "6.8.0",
"is-executable": "2.0.1",
"is-wsl": "3.1.0",
"jose": "5.9.6",
"is-executable": "2.0.2",
"is-wsl": "3.1.1",
"jose": "5.10.0",
"latest-version": "7.0.0",
"liquidjs": "10.26.0",
"liquidjs": "10.27.0",
"lodash": "4.18.1",
"macaddress": "0.5.3",
"minimatch": "9.0.8",
"macaddress": "0.5.4",
"minimatch": "9.0.9",
"mrmime": "1.0.1",
"network-interfaces": "1.1.0",
"node-abort-controller": "3.1.1",
"node-fetch": "3.3.2",
"open": "8.4.2",
"pathe": "1.1.2",
"react": "19.2.4",
"semver": "7.6.3",
"stacktracey": "2.1.8",
"strip-ansi": "7.1.0",
"supports-hyperlinks": "3.1.0",
"semver": "7.8.1",
"stacktracey": "2.2.0",
"strip-ansi": "7.2.0",
"supports-hyperlinks": "3.2.0",
"ts-error": "1.0.6",
"which": "4.0.0",
"zod": "3.24.4"
"zod": "3.25.76"
},
"devDependencies": {
"@types/diff": "^5.2.3",
"@types/fs-extra": "9.0.13",
"@types/gradient-string": "^1.1.2",
"@types/lodash": "4.17.19",
"@types/lodash": "4.17.24",
"@types/react": "^19.0.0",
"@types/semver": "^7.5.2",
"@types/which": "3.0.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
"type-check": "nx type-check"
},
"dependencies": {
"@ast-grep/napi": "0.33.0",
"@ast-grep/napi": "0.43.0",
"esbuild": "0.28.0",
"global-agent": "3.0.0"
},
"devDependencies": {
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@oclif/plugin-commands": "4.1.33",
"@oclif/plugin-plugins": "5.4.47",
"@shopify/app": "4.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"@playwright/test": "^1.50.0",
"@shopify/toml-patch": "0.3.0",
"@types/node": "18.19.70",
"dotenv": "16.4.7",
"dotenv": "16.6.1",
"execa": "^7.2.0",
"node-pty": "^1.0.0",
"strip-ansi": "^7.1.0",
"strip-ansi": "^7.2.0",
"tsx": "^4.21.0"
},
"engines": {
Expand Down
4 changes: 1 addition & 3 deletions packages/organizations/src/cli/prompts/organization.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {Organization} from '../models/organization.js'
import {renderAutocompletePrompt} from '@shopify/cli-kit/node/ui'

export async function selectOrganizationPrompt<T extends Organization>(
organizations: T[],
): Promise<T> {
export async function selectOrganizationPrompt<T extends Organization>(organizations: T[]): Promise<T> {
if (organizations.length === 1) {
return organizations[0]!
}
Expand Down
4 changes: 3 additions & 1 deletion packages/organizations/src/cli/services/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export async function selectOrg(orgIdFromFlag?: string): Promise<Organization> {
if (!org) {
throw new AbortError(
`Organization with ID ${orgIdFromFlag} not found.`,
`Available organizations: ${organizations.map((o) => `${o.businessName} (${o.id})`).join(', ')}`,
`Available organizations: ${organizations
.map((organization) => `${organization.businessName} (${organization.id})`)
.join(', ')}`,
)
}
return org
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
]
},
"dependencies": {
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@shopify/cli-kit": "4.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-did-you-mean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
]
},
"dependencies": {
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@shopify/cli-kit": "4.1.0",
"n-gram": "2.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
]
},
"dependencies": {
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@shopify/cli-kit": "4.1.0"
},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions packages/store/src/cli/services/store/attribution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ vi.mock('@shopify/cli-kit/node/metadata')

describe('store command attribution', () => {
beforeEach(() => {
vi.clearAllMocks()
vi.mocked(hashString).mockReturnValue('hashed-store')
})

Expand All @@ -25,5 +24,4 @@ describe('store command attribution', () => {
})
expect(hashString).toHaveBeenCalledWith('shop.myshopify.com')
})

})
4 changes: 1 addition & 3 deletions packages/store/src/cli/services/store/auth/callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ export async function waitForStoreAuthCode({
res.setHeader('Content-Type', 'text/html')
res.setHeader('Connection', 'close')
res.once('finish', () => settle(() => resolve(code)))
res.end(
renderAuthCallbackPage('Authentication succeeded', 'Close this window and return to the terminal'),
)
res.end(renderAuthCallbackPage('Authentication succeeded', 'Close this window and return to the terminal'))
})

const settle = (callback: () => void) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe('fetchPublicApiVersions', () => {
const adminSession = {token: 'token', storeFqdn: store}

beforeEach(() => {
vi.mocked(adminUrl).mockImplementation((s, version) => `https://${s}/admin/api/${version}/graphql.json`)
vi.mocked(adminUrl).mockImplementation((shop, version) => `https://${shop}/admin/api/${version}/graphql.json`)
})

test('issues the publicApiVersions query against the unstable Admin endpoint', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ function classifyAdminApiError(error: unknown, storeFqdn: string): AbortError |
// 402 Payment Required: the shop is frozen / on hold / otherwise unavailable. Store-state
// issue, not a CLI bug.
if (graphQLClientErrorStatus(error) === 402) {
// eslint-disable-next-line @shopify/cli/no-error-factory-functions
return new AbortError(
`The store ${storeFqdn} is currently unavailable.`,
'Check the store in the Shopify admin and try again once it is reactivated.',
Expand All @@ -164,6 +165,7 @@ function classifyAdminApiError(error: unknown, storeFqdn: string): AbortError |

// User-aborted fetches (Ctrl-C, CLI-side fetch timeouts) are user-driven, not CLI bugs.
if (isUserAbortedFetchError(error)) {
// eslint-disable-next-line @shopify/cli/no-error-factory-functions
return new AbortError(`Request to ${storeFqdn} was aborted before it completed.`)
}

Expand Down
8 changes: 2 additions & 6 deletions packages/store/src/cli/utilities/store-command.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import StoreCommand from './store-command.js'
import {addPublicMetadata, addSensitiveMetadata} from '@shopify/cli-kit/node/metadata'
import {Flags} from '@oclif/core'
import {beforeEach, describe, expect, test, vi} from 'vitest'
import {describe, expect, test, vi} from 'vitest'

vi.mock('@shopify/cli-kit/node/metadata')

class TestStoreCommand extends StoreCommand {
static flags = {
store: Flags.string({required: true}),
store: Flags.string({env: 'SHOPIFY_FLAG_STORE', required: true}),
}

async run(): Promise<void> {
Expand All @@ -16,10 +16,6 @@ class TestStoreCommand extends StoreCommand {
}

describe('StoreCommand', () => {
beforeEach(() => {
vi.clearAllMocks()
})

test('does not record store-specific metadata during base parsing', async () => {
await TestStoreCommand.run(['--store', 'shop.myshopify.com'])

Expand Down
10 changes: 5 additions & 5 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
]
},
"dependencies": {
"@oclif/core": "4.5.3",
"@oclif/core": "4.11.4",
"@shopify/cli-kit": "4.1.0",
"@shopify/theme-check-node": "3.25.0",
"@shopify/theme-language-server-node": "2.21.0",
"@shopify/theme-check-node": "3.26.0",
"@shopify/theme-language-server-node": "2.21.2",
"chokidar": "3.6.0",
"h3": "1.15.9",
"yaml": "2.8.3"
"h3": "1.15.11",
"yaml": "2.9.0"
},
"devDependencies": {
"@shopify/theme-hot-reload": "^0.0.22",
Expand Down
6 changes: 3 additions & 3 deletions packages/theme/src/cli/services/dev-override.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ describe('devWithOverrideFile', () => {
const overrideJson = joinPath(tmpDir, 'missing.json')

// When/Then
await expect(
devWithOverrideFile({adminSession, overrideJson, themeId: '123', open: false}),
).rejects.toThrow(`Override file not found: ${overrideJson}`)
await expect(devWithOverrideFile({adminSession, overrideJson, themeId: '123', open: false})).rejects.toThrow(
`Override file not found: ${overrideJson}`,
)
})
})

Expand Down
3 changes: 0 additions & 3 deletions packages/theme/src/cli/services/dev.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ describe('createKeypressHandler', () => {
expect(openURL).toHaveBeenCalledTimes(1)
expect(openURL).toHaveBeenCalledWith(urls.local)
})

})

describe('dev() Ctrl-C analytics', () => {
Expand Down Expand Up @@ -318,7 +317,6 @@ describe('dev() Ctrl-C analytics', () => {
})

afterEach(() => {
vi.clearAllMocks()
exitSpy.mockRestore()
})

Expand Down Expand Up @@ -403,7 +401,6 @@ describe('dev() port validation', () => {
})

afterEach(() => {
vi.clearAllMocks()
exitSpy.mockRestore()
})

Expand Down
1 change: 0 additions & 1 deletion packages/theme/src/cli/services/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ export function createKeypressHandler(
case 'g':
debouncedOpenURL(urls.giftCard, 'gift card preview')
break
case undefined:
default:
break
}
Expand Down
4 changes: 3 additions & 1 deletion packages/theme/src/cli/utilities/notifier.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ describe('Notifier', () => {

await notifier.notify(fileName)

expect(outputWarn).toHaveBeenCalledWith(expect.stringContaining(`Failed to notify filechange listener at ${tmpDir}`))
expect(outputWarn).toHaveBeenCalledWith(
expect.stringContaining(`Failed to notify filechange listener at ${tmpDir}`),
)
})
})
})
Loading
Loading