cli icon indicating copy to clipboard operation
cli copied to clipboard

Allow ignoring liquid files using .shopifyignore

Open paulomarg opened this issue 1 year ago β€’ 2 comments

WHY are these changes introduced?

Template repos may come with liquid files in them, and currently the CLI will try to parse them all, which will most likely lead to errors when creating new apps.

WHAT is this pull request doing?

Adding a file (name TBD) containing a list of files we want the CLI to leave alone when cloning a repo. That way, templates can determine what is off limits for the CLI. Ideally, this file's name should be generic enough that if we add any other sort of pre-processing, we can still use the same file.

How to test your changes?

Via unit tests, and creating apps with with a private template (slack me for the URL!).

Post-release steps

None needed!

Measuring impact

How do we know this change was effective? Please choose one:

  • [x] Existing analytics will cater for this addition - this would only result in failed app creations

Checklist

  • [x] I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • [ ] I've considered possible documentation changes
    • We probably want to document this file somewhere?

paulomarg avatar Oct 03 '24 13:10 paulomarg

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset. If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

github-actions[bot] avatar Oct 03 '24 13:10 github-actions[bot]

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
72.7% (+0.12% πŸ”Ό)
8550/11760
🟑 Branches
69.69% (+0.55% πŸ”Ό)
4203/6031
🟑 Functions
71.78% (-0.12% πŸ”»)
2210/3079
🟑 Lines
73.03% (+0.15% πŸ”Ό)
8093/11081
Show new covered files 🐣
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / theme-app-extension-next.ts
93.55% 90% 83.33% 93.33%
🟒
... / active-app-release.ts
100% 100% 100% 100%
🟒
... / app-version-by-id.ts
100% 100% 100% 100%
🟒
... / app-versions.ts
100% 100% 100% 100%
🟒
... / apps.ts
100% 100% 100% 100%
🟒
... / create-app-version.ts
100% 100% 100% 100%
🟒
... / create-app.ts
100% 100% 100% 100%
🟒
... / create-asset-url.ts
100% 100% 100% 100%
🟒
... / organization.ts
100% 100% 100% 100%
🟒
... / release-version.ts
100% 100% 100% 100%
🟒
... / specifications.ts
100% 100% 100% 100%
🟒
... / user-info.ts
100% 100% 100% 100%
🟒
... / authorize.ts
100% 75% 100% 100%
πŸ”΄
... / post-auth.ts
44.12% 0% 0% 45.45%
πŸ”΄
... / redirect-listener.ts
14.75% 0% 33.33% 15%
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
🟒
... / app.test-data.ts
91.85% (+0.45% πŸ”Ό)
91.09% (-0.09% πŸ”»)
82.05% (+1.04% πŸ”Ό)
91.28% (+0.47% πŸ”Ό)
🟒
... / app-context.ts
100%
87.5% (-1.97% πŸ”»)
100% 100%
🟒
... / deploy.ts
87.18%
85% (-2.5% πŸ”»)
87.5% 89.19%
🟒
... / generate.ts
100%
80% (-2.14% πŸ”»)
100% 100%
🟒
... / show.ts
100%
66.67% (-8.33% πŸ”»)
100% 100%
πŸ”΄
... / extension.ts
54.55% (-1.01% πŸ”»)
50% 57.14%
55.81% (-1% πŸ”»)
🟒
... / setup-dev-processes.ts
95.24%
80% (-2.14% πŸ”»)
90.91% 94.44%
πŸ”΄
... / theme-app-extension.ts
41.38% (-52.37% πŸ”»)
33.33% (-56.67% πŸ”»)
25% (-58.33% πŸ”»)
40.74% (-52.81% πŸ”»)
🟒
... / extension.ts
91.4% (+0.09% πŸ”Ό)
73.58%
91.3% (-0.36% πŸ”»)
91.21% (+0.1% πŸ”Ό)
🟒
... / session.ts
81.01% (-1.99% πŸ”»)
72.32% (-0.41% πŸ”»)
92.86%
80.67% (-2.09% πŸ”»)
🟒
... / ConcurrentOutput.tsx
98.39% (-1.61% πŸ”»)
90.91% (-4.55% πŸ”»)
100%
98.33% (-1.67% πŸ”»)
🟒
... / admin.ts
82.76% (+1.51% πŸ”Ό)
37.5% (-2.5% πŸ”»)
90%
85.71% (+1.84% πŸ”Ό)

Test suite run success

1944 tests passing in 876 suites.

Report generated by πŸ§ͺjest coverage report action from 09ca5144576eb0bb43f7bda9465b0d8a0c5b0c59

github-actions[bot] avatar Oct 03 '24 13:10 github-actions[bot]

/snapit

isaacroldan avatar Oct 17 '24 08:10 isaacroldan

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Test the snapshot by intalling your package globally:

pnpm i -g @shopify/[email protected]

After installing, validate the version by running just shopify in your terminal If the versions don't match, you might have multiple global instances installed. Use which shopify to find out which one you are running and uninstall it.

github-actions[bot] avatar Oct 17 '24 08:10 github-actions[bot]