Skip to content
Open
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
5 changes: 0 additions & 5 deletions .changeset/frank-oranges-juggle.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/honest-corners-relate.md

This file was deleted.

10 changes: 10 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @shopify/app

## 3.87.1

### Patch Changes

- Updated dependencies [9b97dfa]
- Updated dependencies [9450302]
- @shopify/cli-kit@3.87.1
- @shopify/theme@3.87.1
- @shopify/plugin-cloudflare@3.87.1

## 3.87.0

### Minor Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/app",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"description": "Utilities for loading, building, and publishing apps.",
"homepage": "https://github.com/shopify/cli#readme",
Expand Down Expand Up @@ -50,12 +50,12 @@
"@graphql-typed-document-node/core": "3.2.0",
"@luckycatfactory/esbuild-graphql-loader": "3.8.1",
"@oclif/core": "4.5.3",
"@shopify/cli-kit": "3.87.0",
"@shopify/cli-kit": "3.87.1",
"@shopify/function-runner": "4.1.1",
"@shopify/plugin-cloudflare": "3.87.0",
"@shopify/plugin-cloudflare": "3.87.1",
"@shopify/polaris": "12.27.0",
"@shopify/polaris-icons": "8.11.1",
"@shopify/theme": "3.87.0",
"@shopify/theme": "3.87.1",
"@shopify/theme-check-node": "3.23.0",
"@shopify/toml-patch": "0.3.0",
"body-parser": "1.20.3",
Expand Down
77 changes: 77 additions & 0 deletions packages/app/src/cli/models/app/loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,45 @@ redirect_urls = [ "https://example.com/api/auth" ]
expect(app.webs.length).toBe(0)
})

test('ignores web blocks in gitignored directories', async () => {
// Given
const {webDirectory} = await writeConfig(appConfiguration)

// Create a gitignored directory with a web config
const ignoredDirectory = joinPath(tmpDir, 'ignored-worktree')
await mkdir(ignoredDirectory)
await writeWebConfiguration({webDirectory: ignoredDirectory, role: 'backend'})

// Create .gitignore file
const gitignoreContent = 'ignored-worktree/\n'
await writeFile(joinPath(tmpDir, '.gitignore'), gitignoreContent)

// When
const app = await loadTestingApp()

// Then
// Should only load the web from the non-ignored directory
expect(app.webs.length).toBe(1)
expect(app.webs[0]!.directory).not.toContain('ignored-worktree')
})

test('loads all web blocks when no .gitignore file exists', async () => {
// Given
const {webDirectory} = await writeConfig(appConfiguration)

// Create another directory with a web config (but no .gitignore file)
const anotherDirectory = joinPath(tmpDir, 'another-web')
await mkdir(anotherDirectory)
await writeWebConfiguration({webDirectory: anotherDirectory, role: 'frontend'})

// When
const app = await loadTestingApp()

// Then
// Should load both web blocks since there's no .gitignore
expect(app.webs.length).toBe(2)
})

test('loads the app when it has a extension with a valid configuration', async () => {
// Given
await writeConfig(appConfiguration)
Expand Down Expand Up @@ -834,6 +873,44 @@ redirect_urls = [ "https://example.com/api/auth" ]
expect(app.allExtensions[0]!.localIdentifier).toBe('custom-extension')
})

test('ignores extensions in gitignored directories', async () => {
// Given
await writeConfig(appConfiguration)

// Create a non-ignored extension
const blockConfiguration = `
name = "my_extension"
type = "checkout_post_purchase"
`
await writeBlockConfig({
blockConfiguration,
name: 'my-extension',
})
await writeFile(joinPath(blockPath('my-extension'), 'index.js'), '')

// Create a gitignored directory with an extension
const ignoredExtensionDir = joinPath(tmpDir, 'extensions', 'ignored-extension')
await mkdir(ignoredExtensionDir)
const ignoredBlockConfiguration = `
name = "ignored_extension"
type = "checkout_post_purchase"
`
await writeFile(joinPath(ignoredExtensionDir, 'my-ignored-extension.extension.toml'), ignoredBlockConfiguration)
await writeFile(joinPath(ignoredExtensionDir, 'index.js'), '')

// Create .gitignore file
const gitignoreContent = 'extensions/ignored-extension/\n'
await writeFile(joinPath(tmpDir, '.gitignore'), gitignoreContent)

// When
const app = await loadTestingApp()

// Then
// Should only load the non-ignored extension
expect(app.allExtensions.length).toBe(1)
expect(app.allExtensions[0]!.configuration.name).toBe('my_extension')
})

test('loads the app from a extension directory when it has a extension with a valid configuration', async () => {
// Given
await writeConfig(appConfiguration)
Expand Down
26 changes: 24 additions & 2 deletions packages/app/src/cli/models/app/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ class AppLoader<TConfig extends AppConfiguration, TModuleSpec extends ExtensionS
return joinPath(appDirectory, webGlob, configurationFileNames.web)
})
webConfigGlobs.push(`!${joinPath(appDirectory, '**/node_modules/**')}`)
const webTomlPaths = await glob(webConfigGlobs)
const allWebTomlPaths = await glob(webConfigGlobs)

// Filter out paths that are ignored by .gitignore
const webTomlPaths = await filterIgnoredPaths(appDirectory, allWebTomlPaths)

const webs = await Promise.all(webTomlPaths.map((path) => this.loadWeb(path)))
this.validateWebs(webs)
Expand Down Expand Up @@ -559,7 +562,10 @@ class AppLoader<TConfig extends AppConfiguration, TModuleSpec extends ExtensionS
return joinPath(appDirectory, extensionPath, '*.extension.toml')
})
extensionConfigPaths.push(`!${joinPath(appDirectory, '**/node_modules/**')}`)
const configPaths = await glob(extensionConfigPaths)
const allConfigPaths = await glob(extensionConfigPaths)

// Filter out paths that are ignored by .gitignore
const configPaths = await filterIgnoredPaths(appDirectory, allConfigPaths)

return configPaths.map(async (configurationPath) => {
const directory = dirname(configurationPath)
Expand Down Expand Up @@ -999,6 +1005,22 @@ async function checkIfGitTracked(appDirectory: string, configurationPath: string
return isTracked
}

/**
* Filters an array of paths to exclude those that match patterns in .gitignore
*/
async function filterIgnoredPaths(appDirectory: string, paths: string[]): Promise<string[]> {
const gitIgnorePath = joinPath(appDirectory, '.gitignore')
if (!fileExistsSync(gitIgnorePath)) return paths

const gitIgnoreContent = await readFile(gitIgnorePath)
const ignored = ignore.default().add(gitIgnoreContent)

return paths.filter((path) => {
const relative = relativePath(appDirectory, path)
return !ignored.ignores(relative)
})
}

async function getConfigurationPath(appDirectory: string, configName: string | undefined) {
const configurationFileName = getAppConfigurationFileName(configName)
const configurationPath = joinPath(appDirectory, configurationFileName)
Expand Down
7 changes: 7 additions & 0 deletions packages/cli-kit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @shopify/cli-kit

## 3.87.1

### Patch Changes

- 9b97dfa: Fix zip and brotliCompress functions to handle binary files
- 9450302: [Bug fix] Remove ability to sync Liquid files by checksum

## 3.87.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/cli-kit",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"private": false,
"description": "A set of utilities, interfaces, and models that are common across all the platform features",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-kit/src/public/common/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CLI_KIT_VERSION = '3.87.0'
export const CLI_KIT_VERSION = '3.87.1'
2 changes: 2 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @shopify/cli

## 3.87.1

## 3.87.0

## 3.86.0
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7215,5 +7215,5 @@
"summary": "Trigger delivery of a sample webhook topic payload to a designated address."
}
},
"version": "3.87.0"
"version": "3.87.1"
}
12 changes: 6 additions & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/cli",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"private": false,
"description": "A CLI tool to build for the Shopify platform",
Expand Down Expand Up @@ -109,11 +109,11 @@
"@oclif/core": "4.5.3",
"@oclif/plugin-commands": "4.1.33",
"@oclif/plugin-plugins": "5.4.47",
"@shopify/app": "3.87.0",
"@shopify/cli-kit": "3.87.0",
"@shopify/plugin-cloudflare": "3.87.0",
"@shopify/plugin-did-you-mean": "3.87.0",
"@shopify/theme": "3.87.0",
"@shopify/app": "3.87.1",
"@shopify/cli-kit": "3.87.1",
"@shopify/plugin-cloudflare": "3.87.1",
"@shopify/plugin-did-you-mean": "3.87.1",
"@shopify/theme": "3.87.1",
"@shopify/cli-hydrogen": "11.1.5",
"@types/global-agent": "3.0.0",
"@typescript-eslint/eslint-plugin": "7.13.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/create-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @shopify/create-app

## 3.87.1

## 3.87.0

## 3.86.0
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@
"summary": "Create a new app project"
}
},
"version": "3.87.0"
"version": "3.87.1"
}
6 changes: 3 additions & 3 deletions packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/create-app",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"private": false,
"description": "A CLI tool to create a new Shopify app.",
Expand Down Expand Up @@ -58,8 +58,8 @@
"esbuild": "0.25.12"
},
"devDependencies": {
"@shopify/cli-kit": "3.87.0",
"@shopify/app": "3.87.0",
"@shopify/cli-kit": "3.87.1",
"@shopify/app": "3.87.1",
"esbuild-plugin-copy": "^2.1.1",
"@vitest/coverage-istanbul": "^3.1.4"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/plugin-cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @shopify/plugin-cloudflare

## 3.87.1

### Patch Changes

- Updated dependencies [9b97dfa]
- Updated dependencies [9450302]
- @shopify/cli-kit@3.87.1

## 3.87.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/plugin-cloudflare",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"description": "Enables the creation of Cloudflare tunnels from `shopify app dev`, allowing previews from any device",
"keywords": [
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"dependencies": {
"@oclif/core": "4.5.3",
"@shopify/cli-kit": "3.87.0"
"@shopify/cli-kit": "3.87.1"
},
"devDependencies": {
"@vitest/coverage-istanbul": "^3.1.4"
Expand Down
8 changes: 8 additions & 0 deletions packages/plugin-did-you-mean/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @shopify/plugin-did-you-mean

## 3.87.1

### Patch Changes

- Updated dependencies [9b97dfa]
- Updated dependencies [9450302]
- @shopify/cli-kit@3.87.1

## 3.87.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-did-you-mean/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/plugin-did-you-mean",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"private": true,
"bugs": {
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@oclif/core": "4.5.3",
"@shopify/cli-kit": "3.87.0",
"@shopify/cli-kit": "3.87.1",
"n-gram": "2.0.2"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/theme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @shopify/theme

## 3.87.1

### Patch Changes

- 9450302: [Bug fix] Remove ability to sync Liquid files by checksum
- Updated dependencies [9b97dfa]
- Updated dependencies [9450302]
- @shopify/cli-kit@3.87.1

## 3.87.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/theme",
"version": "3.87.0",
"version": "3.87.1",
"packageManager": "pnpm@10.11.1",
"private": true,
"description": "Utilities for building and publishing themes",
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@oclif/core": "4.5.3",
"@shopify/cli-kit": "3.87.0",
"@shopify/cli-kit": "3.87.1",
"@shopify/theme-check-node": "3.23.0",
"@shopify/theme-language-server-node": "2.20.0",
"chokidar": "3.6.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/ui-extensions-dev-console/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @shopify/ui-extensions-dev-console-app

## 3.87.1

## 3.87.0

## 3.86.0
Expand Down
Loading