shopify-cli 2.6.1 → 2.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +15 -4
  3. data/.github/workflows/shopify.yml +3 -6
  4. data/CHANGELOG.md +79 -97
  5. data/Dockerfile +12 -2
  6. data/Gemfile +1 -0
  7. data/Gemfile.lock +5 -3
  8. data/RELEASING.md +17 -30
  9. data/Rakefile +0 -5
  10. data/ext/shopify-cli/extconf.rb +0 -1
  11. data/lib/project_types/extension/features/argo.rb +8 -2
  12. data/lib/project_types/extension/models/specification_handlers/checkout_post_purchase.rb +1 -1
  13. data/lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb +1 -1
  14. data/lib/project_types/node/commands/serve.rb +7 -16
  15. data/lib/project_types/node/messages/messages.rb +0 -5
  16. data/lib/project_types/php/commands/serve.rb +6 -9
  17. data/lib/project_types/php/messages/messages.rb +1 -4
  18. data/lib/project_types/rails/commands/serve.rb +7 -8
  19. data/lib/project_types/rails/messages/messages.rb +1 -4
  20. data/lib/project_types/script/commands/create.rb +3 -1
  21. data/lib/project_types/script/config/extension_points.yml +7 -0
  22. data/lib/project_types/script/graphql/app_script_set.graphql +2 -0
  23. data/lib/project_types/script/layers/application/build_script.rb +2 -1
  24. data/lib/project_types/script/layers/application/push_script.rb +15 -1
  25. data/lib/project_types/script/layers/domain/push_package.rb +5 -2
  26. data/lib/project_types/script/layers/infrastructure/errors.rb +17 -0
  27. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +29 -13
  28. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +4 -13
  29. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +4 -2
  30. data/lib/project_types/script/layers/infrastructure/script_service.rb +6 -1
  31. data/lib/project_types/script/messages/messages.rb +6 -4
  32. data/lib/project_types/script/ui/error_handler.rb +16 -0
  33. data/lib/project_types/theme/commands/serve.rb +1 -0
  34. data/lib/project_types/theme/messages/messages.rb +5 -0
  35. data/lib/shopify_cli/app_type_detector.rb +32 -0
  36. data/lib/shopify_cli/command.rb +6 -1
  37. data/lib/shopify_cli/command_options/command_serve_options.rb +43 -0
  38. data/lib/shopify_cli/command_options.rb +7 -0
  39. data/lib/shopify_cli/commands/login.rb +3 -3
  40. data/lib/shopify_cli/commands/reporting.rb +38 -0
  41. data/lib/shopify_cli/commands/switch.rb +1 -1
  42. data/lib/shopify_cli/commands.rb +1 -0
  43. data/lib/shopify_cli/constants.rb +7 -3
  44. data/lib/shopify_cli/core/monorail.rb +9 -20
  45. data/lib/shopify_cli/environment.rb +15 -1
  46. data/lib/shopify_cli/exception_reporter.rb +25 -14
  47. data/lib/shopify_cli/messages/messages.rb +48 -19
  48. data/lib/shopify_cli/migrator/migration.rb +1 -1
  49. data/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +1 -1
  50. data/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +41 -0
  51. data/lib/shopify_cli/reporting_configuration_controller.rb +64 -0
  52. data/lib/shopify_cli/services/base_service.rb +13 -0
  53. data/lib/shopify_cli/services/reporting_service.rb +16 -0
  54. data/lib/shopify_cli/services.rb +6 -0
  55. data/lib/shopify_cli/theme/dev_server/watcher.rb +2 -2
  56. data/lib/shopify_cli/theme/dev_server.rb +2 -2
  57. data/lib/shopify_cli/version.rb +1 -1
  58. data/lib/shopify_cli.rb +4 -0
  59. data/shopify-cli.gemspec +1 -8
  60. data/utilities/docker/container.rb +76 -0
  61. data/utilities/docker.rb +44 -3
  62. metadata +14 -5
  63. data/lib/shopify_cli/exception_reporter/permission_controller.rb +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 519cb54ace25231ba49785408b84edc9aeca12d5aafabb6d3d03c73ffb571d92
4
- data.tar.gz: 8614d8f8e102da27e0387cb746d74e036d66267d1b660f7997ca36aba202f73a
3
+ metadata.gz: 8e55157b78cbbd9cd86e3d2e8c542241d7064de3fc4e37768f207dc8ee124f4c
4
+ data.tar.gz: 7b5aa9ae10f96a7724d4a0b0dd79712254ce3f99273a88c7e9198ec03f17ba7c
5
5
  SHA512:
6
- metadata.gz: 7b65eea14dd893650bacc43d468072c04d74f54ca0d0443884bed125e9d45bc604823d9e50e36d3142f34dd6d98b61b023d192ea520d18a678c09e7fcab0ac85
7
- data.tar.gz: 0d6120c8b28f9eb21fa244fa82238e8c008586e50da5c4587ef2d29bc0724e45e175b651559c3513da2c74246ae8c87566feca71ccc405256dd38303dfb76ee6
6
+ metadata.gz: b526446476543316cdd68a40cc5e28af1a0bd0d823757b53901c39b9e2f510a8fb9e9edd52f7fc967df44603d17d9092e95b375e12618f86f6261f45217b4802
7
+ data.tar.gz: 7ee68c03b039974c59d0cbc50ad866faf52ec436fe66b17c1a79e801c4ed1854ddf13fb82274e79e2917c5d63c0066b048d1255d4a3019349dd559b402d12cd8
@@ -21,12 +21,23 @@ Fixes #0000 <!-- link to issue if one exists -->
21
21
  Before / after screenshots appreciated for UI changes.
22
22
  -->
23
23
 
24
- ### Update checklist
24
+ ### How to test your changes?
25
+
25
26
  <!--
26
- Ideally, CHANGELOG entries should be in the format
27
- `* [#PR](PR URL): Message`. You should consider adding your PR
28
- and then making the CHANGELOG update once you know the PR number.
27
+ Please, provide steps for the reviewer to test your changes locally.
29
28
  -->
29
+
30
+ ### Post-release steps
31
+
32
+ <!--
33
+ If changes require post-release steps, for example merging and publishing some documentation changes,
34
+ specify it in this section and add the label "includes-post-release-steps".
35
+ If it doesn't, feel free to remove this section.
36
+ -->
37
+
38
+ ### Update checklist
39
+
30
40
  - [ ] I've added a CHANGELOG entry for this PR (if the change is public-facing)
31
41
  - [ ] I've considered possible cross-platform impacts (Mac, Linux, Windows).
32
42
  - [ ] I've left the version number as is (we'll handle incrementing this when releasing).
43
+ - [ ] I've included any post-release steps in the section above.
@@ -44,19 +44,14 @@ jobs:
44
44
  - name: Run Tests
45
45
  run: bundle exec rake test
46
46
  acceptance_tests:
47
- name: Acceptance Tests with Ruby ${{ matrix.version }} on ${{ matrix.os }}
47
+ name: Acceptance Tests
48
48
  runs-on: ${{ matrix.os }}
49
49
  strategy:
50
50
  matrix:
51
51
  version:
52
52
  - 3.0.2
53
- - 2.6.6
54
- - 2.7.1
55
53
  os:
56
- - macos-10.15
57
- - macos-11
58
54
  - ubuntu-20.04
59
- - ubuntu-18.04
60
55
  steps:
61
56
  - uses: actions/checkout@v2
62
57
  - name: Set Git configuration
@@ -74,6 +69,8 @@ jobs:
74
69
  with:
75
70
  node-version: "14.9.0"
76
71
 
72
+ - uses: docker-practice/actions-setup-docker@master
73
+
77
74
  - name: Install Dependencies
78
75
  run: bundle install
79
76
 
data/CHANGELOG.md CHANGED
@@ -1,13 +1,33 @@
1
- Unreleased
2
- ------
3
- Version 2.6.1
4
- ------
5
-
1
+ From version 2.6.0, the sections in this file adhere to the [keep a changelog](https://keepachangelog.com/en/1.0.0/) specification.
2
+ ## [Unreleased]
3
+
4
+ ## Version 2.6.5
5
+ ### Fixed
6
+ * [#1661](https://github.com/Shopify/shopify-cli/pull/1661): Handle npm list non-zero exit status when pushing scripts
7
+ ## Version 2.6.4
8
+ ### Fixed
9
+ * [#1633](https://github.com/Shopify/shopify-cli/pull/1633): Runtime error when the shop passed on login is invalid
10
+ * [#1625](https://github.com/Shopify/shopify-cli/pull/1625): Fix push bug with post-purchase extensions
11
+
12
+ ### Added
13
+ * [#1542](https://github.com/Shopify/shopify-cli/pull/1542): Add option theme serve --poll to force polling when watching files
14
+ * [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Command to enable or disable anonymous usage and error reporting.
15
+ * [#1614](https://github.com/Shopify/shopify-cli/pull/1614): Add ability to set custom ngrok port for all app serve commands.
16
+ ### Removed
17
+
18
+ ### Changed
19
+ * [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Automatic usage and error reporting configuration has been unified under `analytics.enabled`.
20
+ ### Security
21
+
22
+ ## Version 2.6.3
23
+ * Enable error-reporting.
24
+
25
+ ## Version 2.6.2
26
+ * Fix broken installation due to a missing variable in `extconf.rb`
27
+
28
+ ## Version 2.6.1
6
29
  * [#1608](https://github.com/Shopify/shopify-cli/pull/1608): Fix errors not being reported.
7
-
8
- Version 2.6.0
9
- ------
10
-
30
+ ## Version 2.6.0
11
31
  * [#1574](https://github.com/Shopify/shopify-cli/pull/1574): Hide LoadError for ${RUBY_MAJOR}/ffi_c.
12
32
  * [#1567](https://github.com/Shopify/shopify-cli/pull/1567): Add ability to set custom port for ngrok tunnel in node serve.
13
33
  * [#1584](https://github.com/Shopify/shopify-cli/issues/1584): Fixed extended help message not showing.
@@ -16,92 +36,72 @@ Version 2.6.0
16
36
  * [#1528](https://github.com/Shopify/shopify-cli/pull/1528): Bump theme-check version to 1.7
17
37
  * [#1566](https://github.com/Shopify/shopify-cli/pull/1566): Fix bug when running `npm | yarn list` for extension package resolution
18
38
 
19
- Version 2.5.0
20
- ------
21
-
39
+ ## Version 2.5.0
22
40
  * [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
23
41
 
24
- Version 2.4.0
25
- ------
26
-
42
+ ## Version 2.4.0
27
43
  * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update Theme-Check to 1.4
28
44
  * [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
29
45
 
30
- Version 2.3.0
31
- ------
32
-
46
+ ## Version 2.3.0
33
47
  * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update Theme-Check to 1.2
34
48
  * [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
35
49
  * [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
36
50
  * [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
51
+ v
52
+ ## Version 2.2.2
53
+ * [1382](https:/github.com/Shopify/shopify-cli/pull/1382): Client side module upload for Scripts
37
54
 
38
- Version 2.2.2
39
- ------
40
- * [1382](https://github.com/Shopify/shopify-cli/pull/1382): Client side module upload for Scripts
41
-
42
- Version 2.2.1
43
- ------
44
-
55
+ ## Version 2.2.1
45
56
  * [1432](https://github.com/Shopify/shopify-cli/pull/1432) New method for determining renderer package name
46
57
 
47
- Version 2.2.0
48
- ------
49
- * [#1424](https://github.com/Shopify/shopify-cli/pull/1424/): Add `--resourceUrl` flag to extension serve command
58
+ ## Version 2.2.0
59
+ * [#1424](https//github.com/Shopify/shopify-cli/pull/1424/): Add `--resourceUrl` flag to extension serve command
50
60
  * [#1419](https://github.com/Shopify/shopify-cli/pull/1419): Remove analytics prompt when used in CI
51
61
  * [#1418](https://github.com/Shopify/shopify-cli/pull/1418): Auto configure resource URL for Checkout Extensions
52
62
  * [#1399](https://github.com/Shopify/shopify-cli/pull/1399): Fix error when running `shopify extension serve` in a theme app extension project
53
63
 
54
- Version 2.1.0
55
- -------------
56
- * [#1357](https://github.com/Shopify/shopify-cli/pull/1357): Update Theme-Check to 1.1
64
+ ## Version 2.1.0
65
+ * [#1357](https//github.com/Shopify/shopify-cli/pull/1357): Update Theme-Check to 1.1
57
66
  * [#1352](https://github.com/Shopify/shopify-cli/pull/1352): Add `shopify extension check` for checking theme app extensions
58
67
  * [#1304](https://github.com/Shopify/shopify-cli/pull/1304): Prompt user to run `shopify extension connect` if .env file is missing
59
68
 
60
- Version 2.0.2
61
- -------------
62
- * [#1305](https://github.com/Shopify/shopify-cli/pull/1305): Fix `Uninitialized constant Net::WriteTimeout` error
69
+ ## Version 2.0.2
70
+ * [#1305](https//github.com/Shopify/shopify-cli/pull/1305): Fix `Uninitialized constant Net::WriteTimeout` error
63
71
  * [#1319](https://github.com/Shopify/shopify-cli/pull/1319): Fix `theme pull` not pulling some files
64
72
  * [#1321](https://github.com/Shopify/shopify-cli/pull/1321): Fix error when pulling images with `theme pull`
65
73
  * [#1322](https://github.com/Shopify/shopify-cli/pull/1322): Fix error when running `shopify theme language-server --help`
66
74
  * [#1324](https://github.com/Shopify/shopify-cli/pull/1324): Fix issue [#1308](https://github.com/Shopify/shopify-cli/issues/1308) where a non-English language on Partner Account breaks how CLI determines latest API version.
67
75
  * [#1343](https://github.com/Shopify/shopify-cli/pull/1343): Fix inconsistent use of periods vs ellipsis in messages. This replaces periods with ellipsis.
68
76
 
69
- Version 2.0.1
70
- -------------
71
- * [#1295](https://github.com/Shopify/shopify-cli/pull/1295): Ignore files at the root of a theme app extension project
77
+ ## Version 2.0.1
78
+ * [#1295](https//github.com/Shopify/shopify-cli/pull/1295): Ignore files at the root of a theme app extension project
72
79
  * [#1296](https://github.com/Shopify/shopify-cli/pull/1296): Fix issue [#1294](https://github.com/Shopify/shopify-cli/issues/1294) regarding call to Windows `start` command with URL.
73
80
  * [#1298](https://github.com/Shopify/shopify-cli/pull/1298): Fix error in `theme serve` command
74
81
  * [#1301](https://github.com/Shopify/shopify-cli/pull/1301): Add `theme init` command
75
82
 
76
- Version 2.0.0
77
- -------------
78
- * Adds support for theme development
83
+ ## Version 2.0.0
84
+ * Adds support or theme development
79
85
  * Changes to command structure (note that these are breaking changes, see [README](README.md))
80
86
  * Checkout the [apps](https://shopify.dev/apps/tools/cli) and [themes](https://shopify.dev/themes/tools/cli) sections of the new [shopify.dev](https://shopify.dev) after Unite 2021 (June 29).
81
87
 
82
- Version 1.14.0
83
- --------------
88
+ ## Version 1.14.0
84
89
  * [#1275](https://github.com/Shopify/shopify-cli/pull/1275): Use script.json to specify script metadata
85
90
  * [#1279](https://github.com/Shopify/shopify-cli/pull/1279): Fix bug where a script push still fails after the user answers the force push prompt
86
91
  * [#1288](https://github.com/Shopify/shopify-cli/pull/1288): Fix bug where Scripts SDK was included for projects that don't require it
87
92
 
88
- Version 1.13.1
89
- --------------
93
+ ## Version 1.13.1
90
94
  * [#1274](https://github.com/Shopify/shopify-cli/pull/1274): Only print api_key during error if it exists
91
95
  * [#1272](https://github.com/Shopify/shopify-cli/pull/1272): Fix minor bug with extension serve for UI extensions
92
96
 
93
- Version 1.13.0
94
- --------------
95
-
97
+ ## Version 1.13.0
96
98
  * [#1266](https://github.com/Shopify/shopify-cli/pull/1266): Developer Console release
97
99
  * [#1265](https://github.com/Shopify/shopify-cli/pull/1265): Fix bug where commands hang after an unsuccessful authentication
98
100
 
99
- Version 1.12.0
100
- --------------
101
+ ## Version 1.12.0
101
102
  * [#1255](https://github.com/Shopify/shopify-cli/pull/1255): Fix beta flag checks when running `shopify serve`
102
103
 
103
- Version 1.11.0
104
- --------------
104
+ ## Version 1.11.0
105
105
  * [#1221](https://github.com/Shopify/shopify-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
106
106
  * [#1223](https://github.com/Shopify/shopify-cli/pull/1233): Running `shopify serve` in an extension project now automatically runs `shopify tunnel`.
107
107
  * [#1225](https://github.com/Shopify/shopify-cli/pull/1225): Improved handling of "account not found" scenario, plus improvements to related tests and UX messaging
@@ -109,60 +109,52 @@ Version 1.11.0
109
109
  * [#1238](https://github.com/Shopify/shopify-cli/pull/1238): Auto Tunnel Support for Checkout Extension
110
110
  * [#1256](https://github.com/Shopify/shopify-cli/pull/1256): Allow using spaces around the equal sign on .env file.
111
111
 
112
- Version 1.10.0
113
- --------------
112
+ ## Version 1.10.0
114
113
  * Updating internal features in development
115
114
 
116
- Version 1.9.1
117
- -------------
115
+ ## Version 1.9.1
118
116
  * [#1201](https://github.com/Shopify/shopify-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
119
117
 
120
- Version 1.9.0
121
- -------------
118
+ ## Version 1.9.0
122
119
  * [#1181](https://github.com/Shopify/shopify-cli/pull/1181): Remove the subcommand references of the `generate` command for node apps (fixes [1176](https://github.com/Shopify/shopify-cli/issues/1176))
123
120
 
124
- Version 1.8.0
125
- -------------
121
+ ## Version 1.8.0
126
122
  * [#1119](https://github.com/Shopify/shopify-cli/pull/1119): Enable guest serialization for scripts
127
123
 
128
- Version 1.7.1
129
- ------
124
+ ## Version 1.7.1
125
+
130
126
  * Updating internal features in development
131
127
 
132
- Version 1.7.0
133
- -----
128
+ ## Version 1.7.0
134
129
  * [#1109](https://github.com/Shopify/shopify-cli/pull/1109): Abort app generation if name contains disallowed text.
135
130
  * [#1075](https://github.com/Shopify/shopify-cli/pull/1075): Add support for kebab-case flags
136
131
 
137
- Version 1.6.0
138
- -----
132
+ ## Version 1.6.0
139
133
  * [#1049](https://github.com/Shopify/shopify-cli/pull/1049): Add schema versioning support to the script project type
140
134
  * [#1059](https://github.com/Shopify/shopify-cli/pull/1059): Remove the functionality of the `generate` command for node apps, since it will no longer be feasible with the new node library
141
135
  * [#1046](https://github.com/Shopify/shopify-cli/pull/1046): Include a vendored copy of Webrick, as it's no longer included in Ruby 3.
142
136
  * [#1041](https://github.com/Shopify/shopify-cli/pull/1041): Remove unnecessary shell call to `spring stop`. We already pass `--skip-spring` when creating the app so running `spring stop` would have no effect.
143
137
  * [#1034](https://github.com/Shopify/shopify-cli/pull/1034): Abort if a system call fails.
144
138
 
145
- Version 1.5.0
146
- -----
139
+ ## Version 1.5.0
147
140
  * [#965](https://github.com/Shopify/shopify-cli/pull/965): Remove --no-optional when using npm to create new project
148
141
  * [#958](https://github.com/Shopify/shopify-cli/pull/958): Split `connect` command into project-specific functionality
149
142
  * [#992](https://github.com/Shopify/shopify-cli/pull/992): Add Theme Kit functionality to CLI
150
143
 
151
- Version 1.4.1
152
- ------
144
+ ## Version 1.4.1
145
+
153
146
  * [#917](https://github.com/Shopify/shopify-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
154
147
 
155
- Version 1.4.0
156
- ------
148
+ ## Version 1.4.0
149
+
157
150
  * Updates to tests, dependencies and internal tooling
158
151
  * [#924](https://github.com/Shopify/shopify-cli/pull/924): Improve debugging messages on Partner API errors
159
152
 
160
- Version 1.3.1
161
- ------
153
+ ## Version 1.3.1
154
+
162
155
  * Allow any characters in ngrok account names
163
156
 
164
- Version 1.3.0
165
- ------
157
+ ## Version 1.3.0
166
158
  * Support for new `shopify config analytics` command to enable/disable anonymous usage reporting
167
159
 
168
160
  Version 1.2.0
@@ -177,49 +169,39 @@ Version 1.1.1
177
169
  ------
178
170
  * Fix a bug where usernames with spaces caused issues on Windows
179
171
 
180
- Version 1.1.0
181
- ------
172
+ ## Version 1.1.0
182
173
  * Add native Windows 10 support, including variety of stability fixes.
183
174
 
184
- Version 1.0.5
185
- ------
175
+ ## Version 1.0.5
186
176
  * Fix a bug in out opt-in metrics
187
177
 
188
- Version 1.0.4
189
- ------
178
+ ## Version 1.0.4
190
179
  * Fix a bug when running the `connect` command with an account with multiple organizations
191
180
 
192
- Version 1.0.3
193
- ------
181
+ ## Version 1.0.3
194
182
  * Fix a bug which causes an error in the `populate` and `generate` commands when prompting for the shop name
195
183
 
196
- Version 1.0.2
197
- ------
184
+ ## Version 1.0.2
198
185
  * Fix missing shop parameter to AdminAPI.query() call (impacting populate and generate commands)
199
186
 
200
- Version 1.0.1
201
- ------
187
+ ## Version 1.0.1
202
188
  * Fixed an issue with RVM taking over the shell shim fd when it was not in use
203
189
 
204
- Version 1.0.0
205
- ------
190
+ ## Version 1.0.0
206
191
  * Release the installer-based version of the CLI
207
192
 
208
- Version 0.9.3 - Internal Test Version
209
- ------
193
+ ## Version 0.9.3 - Internal Test Version
210
194
  * Rebased to master
211
195
  * Removed auto-generated files from builds directory
212
196
 
213
- Version 0.9.2 - Internal Test Version
214
- ------
197
+ ## Version 0.9.2 - Internal Test Version
215
198
  * Rebased to master, to pull in 7+ Pull Requests
216
199
  * Updates to dependencies to package files (updated Ruby version)
217
200
 
218
- Version 0.9.1 - Internal Test Version
219
- ------
201
+ ## Version 0.9.1 - Internal Test Version
220
202
  * Updated required Ruby version for the CLI
221
203
  * Minor fixes for the build / release process
222
204
 
223
- Version 0.9.0 - Internal Test Version
224
- ------
205
+ ## Version 0.9.0 - Internal Test Version
206
+
225
207
  * Initial test release of gem-based CLI
data/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # This is a Docker image to test the CLI in UNIX environments other than macOS
2
2
  # Build the image: docker build . -t shopify-cli
3
3
  # Run tests: docker run -t --rm --volume "$(pwd):/usr/src/app" shopify-cli bundle exec rake test
4
- FROM cimg/ruby:2.7.1-node
4
+ FROM cimg/ruby:2.7.1
5
5
 
6
6
  RUN git config --global user.email "development-lifecycle@shopify.com"
7
7
  RUN git config --global user.name "Development Lifecycle"
@@ -14,4 +14,14 @@ WORKDIR /usr/src/app
14
14
  COPY Gemfile Gemfile.lock ./
15
15
  COPY shopify-cli.gemspec shopify-cli.gemspec
16
16
  COPY lib/shopify_cli/version.rb lib/shopify_cli/version.rb
17
- RUN bundle install
17
+ RUN bundle install
18
+
19
+ # Update git
20
+ RUN sudo add-apt-repository -y ppa:git-core/ppa
21
+ RUN sudo apt-get update
22
+ RUN sudo apt-get install git -y
23
+
24
+ # Install the latest version of NodeJS
25
+ RUN sudo apt-get install ca-certificates -y
26
+ RUN curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
27
+ RUN sudo apt-get install -y nodejs
data/Gemfile CHANGED
@@ -13,6 +13,7 @@ group :development, :test do
13
13
  gem "rubocop-shopify", require: false
14
14
  gem "rubocop-minitest", require: false
15
15
  gem "rubocop-rake", require: false
16
+ gem "iniparse", "~> 1.5"
16
17
  end
17
18
 
18
19
  group :test do
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.6.1)
4
+ shopify-cli (2.6.5)
5
5
  bugsnag (~> 6.22)
6
6
  listen (~> 3.7.0)
7
- theme-check (~> 1.7)
7
+ theme-check (~> 1.7.2)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -56,6 +56,7 @@ GEM
56
56
  fakefs (1.3.2)
57
57
  ffi (1.15.4)
58
58
  hashdiff (1.0.1)
59
+ iniparse (1.5.0)
59
60
  liquid (5.1.0)
60
61
  listen (3.7.0)
61
62
  rb-fsevent (~> 0.10, >= 0.10.3)
@@ -136,6 +137,7 @@ DEPENDENCIES
136
137
  byebug
137
138
  cucumber (~> 7.0)
138
139
  fakefs (>= 1.0)
140
+ iniparse (~> 1.5)
139
141
  minitest (>= 5.0.0)
140
142
  minitest-fail-fast
141
143
  minitest-reporters
@@ -151,4 +153,4 @@ DEPENDENCIES
151
153
  webmock
152
154
 
153
155
  BUNDLED WITH
154
- 2.2.22
156
+ 2.2.29
data/RELEASING.md CHANGED
@@ -1,65 +1,52 @@
1
1
  ## Releasing Shopify CLI
2
2
 
3
3
  1. Check the Semantic Versioning page for info on how to version the new release: http://semver.org
4
-
5
- 1. Make sure you're on the most recent `main`
4
+ 2. Make sure you're on the most recent `main`
6
5
  ```
7
6
  $ git checkout main
8
7
  $ git pull
9
8
  ```
10
-
11
- 1. Create a branch named `release_X_Y_Z` (replacing `X_Y_Z` with the intended release version)
9
+ 3. Create a branch named `release_X_Y_Z` (replacing `X_Y_Z` with the intended release version)
12
10
  ```
13
11
  $ git checkout -b release_X_Y_Z
14
12
  ```
15
-
16
- 1. Update the version of Shopify CLI in `lib/shopify_cli/version.rb`
17
-
18
- 1. Update the version of Shopify CLI at the top of `Gemfile.lock` (failing to do so causes the CI build to fail)
19
-
20
- 1. Add an entry for the new release to `CHANGELOG.md`
21
-
22
- 1. Commit the changes with a commit message like "Packaging for release X.Y.Z"
13
+ 4. Update the version of Shopify CLI in `lib/shopify_cli/version.rb`
14
+ 5. Update the version of Shopify CLI at the top of `Gemfile.lock` (failing to do so causes the CI build to fail)
15
+ 6. Add an entry for the new release to `CHANGELOG.md`
16
+ 7. Commit the changes with a commit message like "Packaging for release X.Y.Z"
23
17
  ```
24
18
  $ git commit -am "Packaging for release vX.Y.Z"
25
19
  ```
26
-
27
- 1. Push out the changes
20
+ 8. Push out the changes
28
21
  ```
29
22
  $ git push -u origin release_X_Y_Z
30
23
  ```
31
24
 
32
- 1. Open a PR for the branch, get necessary approvals from code owners and merge into main branch. Note that the PR title will be the release note in Shipit, so make sure it mentions the release
33
-
34
- 1. Deploy using Shipit
35
-
36
- 1. Update your `main` branch to the latest version
25
+ 9. Open a PR for the branch, get necessary approvals from code owners and merge into main branch. Note that the PR title will be the release note in Shipit, so make sure it mentions the release
26
+ 10. Deploy using Shipit
27
+ 11. Update your `main` branch to the latest version
37
28
  ```
38
29
  $ git checkout main
39
30
  $ git pull
40
31
  ```
41
-
42
- 1. On local machine and _AFTER_ gem has been published to https://rubygems.org, run
32
+
33
+ 12. On local machine and _AFTER_ gem has been published to https://rubygems.org, run
43
34
  ```
44
35
  $ rake package
45
36
  ```
46
37
  This will generate the `.deb`, `.rpm` and brew formula files, which will be located in `packaging/builds/X.Y.Z/`.
47
38
 
48
- 1. Clone the `Shopify/homebrew-shopify` repository (if not already cloned), and then
39
+ 13. Clone the `Shopify/homebrew-shopify` repository (if not already cloned), and then
49
40
  * create a branch named `release_X_Y_Z_of_shopify-cli`
50
41
  * update the brew formula in `shopify-cli.rb` with the generated formula in `packaging/builds/X.Y.Z/` in the `Shopify/shopify-cli` repo (from the `rake package` step above)
51
42
  * commit the change and create a PR on the [Shopify Homebrew repository](https://github.com/Shopify/homebrew-shopify)
52
43
  * when PR is approved, merge into main branch
53
-
54
- 1. Go to [releases](https://github.com/Shopify/shopify-cli/releases) page of `Shopify/shopify-cli` repo and create a new release:
44
+
45
+ 14. Go to [releases](https://github.com/Shopify/shopify-cli/releases) page of `Shopify/shopify-cli` repo and create a new release:
55
46
  * use the tag created by Shipit (should be "vX.Y.Z")
56
47
  * release title = "Version X.Y.Z"
57
- * description should be
58
- ```
59
- Release of version X.Y.Z of Shopify CLI
60
-
61
- Please refer to [CHANGELOG](https://github.com/Shopify/shopify-cli/blob/main/CHANGELOG.md) for details.
62
- ```
48
+ * description should be the content of the section in the `CHANGELOG.md`
63
49
  * upload the `.deb` and `.rpm` files from `packaging/builds/X.Y.Z/` (generated in step 9)
64
50
  * if it's a pre-release version, select the "This is a pre-release" checkbox
65
51
  * and click "Publish release".
52
+ 15. Go through all the PR [labeled with `includes-post-release-steps`](https://github.com/Shopify/shopify-cli/labels/includes-post-release-steps) and follow the post-release steps described in those PRs. Delete the labels afterward.
data/Rakefile CHANGED
@@ -22,11 +22,6 @@ namespace :linux do
22
22
  task :test do
23
23
  Utilities::Docker.run_and_rm_container("bundle", "exec", "rake", "test")
24
24
  end
25
-
26
- desc "Runs the acceptance tests suite in a Linux Docker environment"
27
- task :features do
28
- Utilities::Docker.run_and_rm_container("bundle", "exec", "cucumber")
29
- end
30
25
  end
31
26
 
32
27
  RuboCop::RakeTask.new
@@ -57,5 +57,4 @@ else
57
57
  MAKEFILE
58
58
  end
59
59
 
60
- File.write(installation_date_path, Time.now.to_i.to_s)
61
60
  File.write("Makefile", makefile_content)
@@ -23,7 +23,7 @@ module Extension
23
23
  Features::ArgoSetup.new(git_template: git_template).call(directory_name, identifier, context)
24
24
  end
25
25
 
26
- def config(context)
26
+ def config(context, include_renderer_version: true)
27
27
  js_system = ShopifyCLI::JsSystem.new(ctx: context)
28
28
  if js_system.package_manager == "yarn"
29
29
  run_yarn_install(context, js_system)
@@ -31,9 +31,15 @@ module Extension
31
31
  end
32
32
  filepath = File.join(context.root, SCRIPT_PATH)
33
33
  context.abort(context.message("features.argo.missing_file_error")) unless File.exist?(filepath)
34
+
35
+ renderer_version = nil
36
+ if include_renderer_version
37
+ renderer_version = renderer_package(context).version
38
+ end
39
+
34
40
  begin
35
41
  {
36
- renderer_version: renderer_package(context).version,
42
+ renderer_version: renderer_version,
37
43
  serialized_script: Base64.strict_encode64(File.read(filepath).chomp),
38
44
  }
39
45
  rescue StandardError
@@ -11,7 +11,7 @@ module Extension
11
11
  def config(context)
12
12
  {
13
13
  **Features::ArgoConfig.parse_yaml(context, PERMITTED_CONFIG_KEYS),
14
- **argo.config(context),
14
+ **argo.config(context, include_renderer_version: false),
15
15
  }
16
16
  end
17
17
 
@@ -9,7 +9,7 @@ module Extension
9
9
  def config(context)
10
10
  {
11
11
  **Features::ArgoConfig.parse_yaml(context, PERMITTED_CONFIG_KEYS),
12
- **argo.config(context),
12
+ **argo.config(context, include_renderer_version: false),
13
13
  }
14
14
  end
15
15
 
@@ -2,20 +2,18 @@
2
2
  module Node
3
3
  class Command
4
4
  class Serve < ShopifyCLI::SubCommand
5
+ include ShopifyCLI::CommandOptions::CommandServeOptions
6
+
5
7
  prerequisite_task ensure_project_type: :node
6
8
  prerequisite_task :ensure_env, :ensure_dev_store
7
9
 
8
- options do |parser, flags|
9
- parser.on("--host=HOST") do |h|
10
- flags[:host] = h.gsub('"', "")
11
- end
12
- parser.on("--port=PORT") { |port| flags[:port] = port }
13
- end
10
+ parse_host_option
11
+ parse_port_option
14
12
 
15
13
  def call(*)
16
14
  project = ShopifyCLI::Project.current
17
- url = options.flags[:host] || ShopifyCLI::Tunnel.start(@ctx)
18
- @ctx.abort(@ctx.message("node.serve.error.host_must_be_https")) if url.match(/^https/i).nil?
15
+ tunnel_port = port.to_s
16
+ url = host || ShopifyCLI::Tunnel.start(@ctx, port: tunnel_port)
19
17
  project.env.update(@ctx, :host, url)
20
18
  ShopifyCLI::Tasks::UpdateDashboardURLS.call(
21
19
  @ctx,
@@ -30,18 +28,11 @@ module Node
30
28
 
31
29
  CLI::UI::Frame.open(@ctx.message("node.serve.running_server")) do
32
30
  env = project.env.to_h
33
- env["PORT"] = port.to_s
31
+ env["PORT"] = tunnel_port
34
32
  @ctx.system("npm run dev", env: env)
35
33
  end
36
34
  end
37
35
 
38
- def port
39
- return ShopifyCLI::Tunnel::PORT.to_s unless options.flags.key?(:port)
40
- port = options.flags[:port].to_i
41
- @ctx.abort(@ctx.message("node.serve.error.invalid_port", options.flags[:port])) unless port > 0
42
- port
43
- end
44
-
45
36
  def self.help
46
37
  ShopifyCLI::Context.message("node.serve.help", ShopifyCLI::TOOL_NAME)
47
38
  end
@@ -122,11 +122,6 @@ module Node
122
122
  {{cyan:--port=PORT}}: Use custom port.
123
123
  HELP
124
124
 
125
- error: {
126
- host_must_be_https: "HOST must be a HTTPS url.",
127
- invalid_port: "%s is not a valid port.",
128
- },
129
-
130
125
  open_info: <<~MESSAGE,
131
126
  {{*}} To install and start using your app, open this URL in your browser:
132
127
  {{green:%s}}