shopify-cli 2.6.2 → 2.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) 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 +89 -99
  5. data/CONTRIBUTING.md +9 -1
  6. data/Dockerfile +22 -4
  7. data/Gemfile +2 -0
  8. data/Gemfile.lock +7 -3
  9. data/RELEASING.md +17 -30
  10. data/Rakefile +0 -5
  11. data/lib/project_types/extension/cli.rb +1 -0
  12. data/lib/project_types/extension/commands/create.rb +1 -0
  13. data/lib/project_types/extension/features/argo.rb +9 -10
  14. data/lib/project_types/extension/features/argo_serve.rb +1 -1
  15. data/lib/project_types/extension/forms/create.rb +1 -1
  16. data/lib/project_types/extension/forms/questions/ask_template.rb +2 -1
  17. data/lib/project_types/extension/messages/messages.rb +1 -0
  18. data/lib/project_types/extension/models/server_config/extension.rb +2 -0
  19. data/lib/project_types/extension/models/specification_handlers/checkout_post_purchase.rb +1 -1
  20. data/lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb +1 -1
  21. data/lib/project_types/extension/tasks/converters/server_config_converter.rb +4 -5
  22. data/lib/project_types/extension/tasks/find_package_from_json.rb +37 -0
  23. data/lib/project_types/extension/tasks/load_server_config.rb +6 -1
  24. data/lib/project_types/node/commands/serve.rb +7 -16
  25. data/lib/project_types/node/messages/messages.rb +0 -5
  26. data/lib/project_types/php/commands/serve.rb +6 -9
  27. data/lib/project_types/php/messages/messages.rb +1 -4
  28. data/lib/project_types/rails/commands/create.rb +45 -16
  29. data/lib/project_types/rails/commands/serve.rb +7 -8
  30. data/lib/project_types/rails/forms/create.rb +0 -1
  31. data/lib/project_types/rails/messages/messages.rb +1 -4
  32. data/lib/project_types/script/commands/create.rb +4 -5
  33. data/lib/project_types/script/config/extension_points.yml +10 -0
  34. data/lib/project_types/script/errors.rb +0 -18
  35. data/lib/project_types/script/graphql/app_script_set.graphql +2 -0
  36. data/lib/project_types/script/layers/application/build_script.rb +2 -1
  37. data/lib/project_types/script/layers/application/create_script.rb +2 -2
  38. data/lib/project_types/script/layers/application/push_script.rb +15 -1
  39. data/lib/project_types/script/layers/domain/push_package.rb +5 -2
  40. data/lib/project_types/script/layers/domain/script_json.rb +1 -1
  41. data/lib/project_types/script/layers/infrastructure/api_clients/partners_proxy_api_client.rb +0 -4
  42. data/lib/project_types/script/layers/infrastructure/errors.rb +17 -2
  43. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +29 -13
  44. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +29 -13
  45. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +4 -2
  46. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +3 -4
  47. data/lib/project_types/script/layers/infrastructure/script_service.rb +7 -2
  48. data/lib/project_types/script/messages/messages.rb +9 -22
  49. data/lib/project_types/script/ui/error_handler.rb +16 -26
  50. data/lib/project_types/theme/commands/serve.rb +2 -0
  51. data/lib/project_types/theme/messages/messages.rb +6 -0
  52. data/lib/shopify_cli/app_type_detector.rb +32 -0
  53. data/lib/shopify_cli/command.rb +6 -1
  54. data/lib/shopify_cli/command_options/command_serve_options.rb +43 -0
  55. data/lib/shopify_cli/command_options.rb +7 -0
  56. data/lib/shopify_cli/commands/login.rb +3 -3
  57. data/lib/shopify_cli/commands/reporting.rb +38 -0
  58. data/lib/shopify_cli/commands/switch.rb +1 -1
  59. data/lib/shopify_cli/commands.rb +1 -0
  60. data/lib/shopify_cli/constants.rb +7 -3
  61. data/lib/shopify_cli/core/monorail.rb +9 -20
  62. data/lib/shopify_cli/environment.rb +15 -1
  63. data/lib/shopify_cli/exception_reporter.rb +29 -15
  64. data/lib/shopify_cli/messages/messages.rb +48 -19
  65. data/lib/shopify_cli/migrator/migration.rb +1 -1
  66. data/lib/shopify_cli/migrator/migrations/1631709766_noop.rb +1 -1
  67. data/lib/shopify_cli/migrator/migrations/1633691650_merge_reporting_configuration.rb +41 -0
  68. data/lib/shopify_cli/migrator.rb +9 -11
  69. data/lib/shopify_cli/reporting_configuration_controller.rb +64 -0
  70. data/lib/shopify_cli/services/base_service.rb +13 -0
  71. data/lib/shopify_cli/services/reporting_service.rb +16 -0
  72. data/lib/shopify_cli/services.rb +6 -0
  73. data/lib/shopify_cli/theme/dev_server/watcher.rb +2 -2
  74. data/lib/shopify_cli/theme/dev_server.rb +3 -2
  75. data/lib/shopify_cli/version.rb +1 -1
  76. data/lib/shopify_cli.rb +4 -0
  77. data/shopify-cli.gemspec +2 -13
  78. data/utilities/docker/container.rb +97 -0
  79. data/utilities/docker.rb +45 -3
  80. metadata +18 -10
  81. data/ext/shopify-cli/extconf.rb +0 -60
  82. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +0 -0
  83. 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: 3be31c7b6aa8c0ba6b906a25a798413f9e1669352f1eaaefb89c92c5bc54ebb5
4
- data.tar.gz: ba07be42290721bb6ae4f445dfeefe54397438f2d4e7d0d2d39e9e234c983657
3
+ metadata.gz: bb41d18df964832b9ebc6be79e80006c4750c8d416c9550cbcc625d190bf26b9
4
+ data.tar.gz: d5c6b523faf27c0a6b3c53ccaadd1c4f47e932d7e0c2520e7f0bfcb2f7f7b820
5
5
  SHA512:
6
- metadata.gz: c90a4f136eb65bbe022cd0de954e3cede6834409e11d5917ef56ce16a35c7eb734eae18cdebbb2944970a8aeff6e15a4f952146fc7a642f4aa49142bace794b3
7
- data.tar.gz: 6676dc46d924956d47b31d34356190c64a9980d3561328ab84de90dadf559462fc3d4d626865fe9e7d88f8f4ace1432a11615bd81a4e412f7278b7aaa5305cca
6
+ metadata.gz: 396c3c47f510e78d67775fc6b6a091849ce8c3955d2c91ec516659ef4377df44a00a3faaa70facdd0649763b2a3b69f96ab4f859a003b23becd6baf3202d4b64
7
+ data.tar.gz: 1514e2a4c8f1841e8714a30f4e05450c5116863cc2c14cf5655143a43a49e1b5f6f2da1b8ffc2af6acd683359ea970920090ba55c6f82213e91de1cd4aeb7b87
@@ -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,18 +1,46 @@
1
- Unreleased
2
- ------
3
- Version 2.6.2
4
- ------
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]
5
3
 
6
- * Fix broken installation due to a missing variable in `extconf.rb`
4
+ ## Version 2.6.6
5
+ ### Added
6
+ * [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--bind=HOST` option to `shopify theme serve`.
7
+
8
+ ### Fixed
9
+ * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Fix migrator's incompatibility with Ruby 2.5.
10
+ * [#1690](https://github.com/Shopify/shopify-cli/pull/1690): Fix `extension push` command for `PRODUCT_SUBSCRIPTION` extensions
7
11
 
8
- Version 2.6.1
9
- ------
12
+ ### Changed
13
+ * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Change the `@shopify/scripts-checkout-apis-temp` package name to `@shopify/scripts-discount-apis`.
14
+
15
+ ### Removed
16
+ * [#1664](https://github.com/Shopify/shopify-cli/pull/1664): Remove ruby-locking extension
17
+ ## Version 2.6.5
18
+ ### Fixed
19
+ * [#1661](https://github.com/Shopify/shopify-cli/pull/1661): Handle npm list non-zero exit status when pushing scripts
20
+ ## Version 2.6.4
21
+ ### Fixed
22
+ * [#1633](https://github.com/Shopify/shopify-cli/pull/1633): Runtime error when the shop passed on login is invalid
23
+ * [#1625](https://github.com/Shopify/shopify-cli/pull/1625): Fix push bug with post-purchase extensions
24
+
25
+ ### Added
26
+ * [#1542](https://github.com/Shopify/shopify-cli/pull/1542): Add option theme serve --poll to force polling when watching files
27
+ * [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Command to enable or disable anonymous usage and error reporting.
28
+ * [#1614](https://github.com/Shopify/shopify-cli/pull/1614): Add ability to set custom ngrok port for all app serve commands.
29
+ ### Removed
30
+
31
+ ### Changed
32
+ * [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Automatic usage and error reporting configuration has been unified under `analytics.enabled`.
33
+ ### Security
34
+
35
+ ## Version 2.6.3
36
+ * Enable error-reporting.
37
+
38
+ ## Version 2.6.2
39
+ * Fix broken installation due to a missing variable in `extconf.rb`
10
40
 
41
+ ## Version 2.6.1
11
42
  * [#1608](https://github.com/Shopify/shopify-cli/pull/1608): Fix errors not being reported.
12
-
13
- Version 2.6.0
14
- ------
15
-
43
+ ## Version 2.6.0
16
44
  * [#1574](https://github.com/Shopify/shopify-cli/pull/1574): Hide LoadError for ${RUBY_MAJOR}/ffi_c.
17
45
  * [#1567](https://github.com/Shopify/shopify-cli/pull/1567): Add ability to set custom port for ngrok tunnel in node serve.
18
46
  * [#1584](https://github.com/Shopify/shopify-cli/issues/1584): Fixed extended help message not showing.
@@ -21,92 +49,72 @@ Version 2.6.0
21
49
  * [#1528](https://github.com/Shopify/shopify-cli/pull/1528): Bump theme-check version to 1.7
22
50
  * [#1566](https://github.com/Shopify/shopify-cli/pull/1566): Fix bug when running `npm | yarn list` for extension package resolution
23
51
 
24
- Version 2.5.0
25
- ------
26
-
52
+ ## Version 2.5.0
27
53
  * [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
28
54
 
29
- Version 2.4.0
30
- ------
31
-
55
+ ## Version 2.4.0
32
56
  * [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update Theme-Check to 1.4
33
57
  * [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
34
58
 
35
- Version 2.3.0
36
- ------
37
-
59
+ ## Version 2.3.0
38
60
  * [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update Theme-Check to 1.2
39
61
  * [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
40
62
  * [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
41
63
  * [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
64
+ v
65
+ ## Version 2.2.2
66
+ * [1382](https:/github.com/Shopify/shopify-cli/pull/1382): Client side module upload for Scripts
42
67
 
43
- Version 2.2.2
44
- ------
45
- * [1382](https://github.com/Shopify/shopify-cli/pull/1382): Client side module upload for Scripts
46
-
47
- Version 2.2.1
48
- ------
49
-
68
+ ## Version 2.2.1
50
69
  * [1432](https://github.com/Shopify/shopify-cli/pull/1432) New method for determining renderer package name
51
70
 
52
- Version 2.2.0
53
- ------
54
- * [#1424](https://github.com/Shopify/shopify-cli/pull/1424/): Add `--resourceUrl` flag to extension serve command
71
+ ## Version 2.2.0
72
+ * [#1424](https//github.com/Shopify/shopify-cli/pull/1424/): Add `--resourceUrl` flag to extension serve command
55
73
  * [#1419](https://github.com/Shopify/shopify-cli/pull/1419): Remove analytics prompt when used in CI
56
74
  * [#1418](https://github.com/Shopify/shopify-cli/pull/1418): Auto configure resource URL for Checkout Extensions
57
75
  * [#1399](https://github.com/Shopify/shopify-cli/pull/1399): Fix error when running `shopify extension serve` in a theme app extension project
58
76
 
59
- Version 2.1.0
60
- -------------
61
- * [#1357](https://github.com/Shopify/shopify-cli/pull/1357): Update Theme-Check to 1.1
77
+ ## Version 2.1.0
78
+ * [#1357](https//github.com/Shopify/shopify-cli/pull/1357): Update Theme-Check to 1.1
62
79
  * [#1352](https://github.com/Shopify/shopify-cli/pull/1352): Add `shopify extension check` for checking theme app extensions
63
80
  * [#1304](https://github.com/Shopify/shopify-cli/pull/1304): Prompt user to run `shopify extension connect` if .env file is missing
64
81
 
65
- Version 2.0.2
66
- -------------
67
- * [#1305](https://github.com/Shopify/shopify-cli/pull/1305): Fix `Uninitialized constant Net::WriteTimeout` error
82
+ ## Version 2.0.2
83
+ * [#1305](https//github.com/Shopify/shopify-cli/pull/1305): Fix `Uninitialized constant Net::WriteTimeout` error
68
84
  * [#1319](https://github.com/Shopify/shopify-cli/pull/1319): Fix `theme pull` not pulling some files
69
85
  * [#1321](https://github.com/Shopify/shopify-cli/pull/1321): Fix error when pulling images with `theme pull`
70
86
  * [#1322](https://github.com/Shopify/shopify-cli/pull/1322): Fix error when running `shopify theme language-server --help`
71
87
  * [#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.
72
88
  * [#1343](https://github.com/Shopify/shopify-cli/pull/1343): Fix inconsistent use of periods vs ellipsis in messages. This replaces periods with ellipsis.
73
89
 
74
- Version 2.0.1
75
- -------------
76
- * [#1295](https://github.com/Shopify/shopify-cli/pull/1295): Ignore files at the root of a theme app extension project
90
+ ## Version 2.0.1
91
+ * [#1295](https//github.com/Shopify/shopify-cli/pull/1295): Ignore files at the root of a theme app extension project
77
92
  * [#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.
78
93
  * [#1298](https://github.com/Shopify/shopify-cli/pull/1298): Fix error in `theme serve` command
79
94
  * [#1301](https://github.com/Shopify/shopify-cli/pull/1301): Add `theme init` command
80
95
 
81
- Version 2.0.0
82
- -------------
83
- * Adds support for theme development
96
+ ## Version 2.0.0
97
+ * Adds support or theme development
84
98
  * Changes to command structure (note that these are breaking changes, see [README](README.md))
85
99
  * 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).
86
100
 
87
- Version 1.14.0
88
- --------------
101
+ ## Version 1.14.0
89
102
  * [#1275](https://github.com/Shopify/shopify-cli/pull/1275): Use script.json to specify script metadata
90
103
  * [#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
91
104
  * [#1288](https://github.com/Shopify/shopify-cli/pull/1288): Fix bug where Scripts SDK was included for projects that don't require it
92
105
 
93
- Version 1.13.1
94
- --------------
106
+ ## Version 1.13.1
95
107
  * [#1274](https://github.com/Shopify/shopify-cli/pull/1274): Only print api_key during error if it exists
96
108
  * [#1272](https://github.com/Shopify/shopify-cli/pull/1272): Fix minor bug with extension serve for UI extensions
97
109
 
98
- Version 1.13.0
99
- --------------
100
-
110
+ ## Version 1.13.0
101
111
  * [#1266](https://github.com/Shopify/shopify-cli/pull/1266): Developer Console release
102
112
  * [#1265](https://github.com/Shopify/shopify-cli/pull/1265): Fix bug where commands hang after an unsuccessful authentication
103
113
 
104
- Version 1.12.0
105
- --------------
114
+ ## Version 1.12.0
106
115
  * [#1255](https://github.com/Shopify/shopify-cli/pull/1255): Fix beta flag checks when running `shopify serve`
107
116
 
108
- Version 1.11.0
109
- --------------
117
+ ## Version 1.11.0
110
118
  * [#1221](https://github.com/Shopify/shopify-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
111
119
  * [#1223](https://github.com/Shopify/shopify-cli/pull/1233): Running `shopify serve` in an extension project now automatically runs `shopify tunnel`.
112
120
  * [#1225](https://github.com/Shopify/shopify-cli/pull/1225): Improved handling of "account not found" scenario, plus improvements to related tests and UX messaging
@@ -114,60 +122,52 @@ Version 1.11.0
114
122
  * [#1238](https://github.com/Shopify/shopify-cli/pull/1238): Auto Tunnel Support for Checkout Extension
115
123
  * [#1256](https://github.com/Shopify/shopify-cli/pull/1256): Allow using spaces around the equal sign on .env file.
116
124
 
117
- Version 1.10.0
118
- --------------
125
+ ## Version 1.10.0
119
126
  * Updating internal features in development
120
127
 
121
- Version 1.9.1
122
- -------------
128
+ ## Version 1.9.1
123
129
  * [#1201](https://github.com/Shopify/shopify-cli/pull/1201) Determine Argo Renderer Dynamically. This fixes `shopify serve` and `shopify push` for extensions.
124
130
 
125
- Version 1.9.0
126
- -------------
131
+ ## Version 1.9.0
127
132
  * [#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))
128
133
 
129
- Version 1.8.0
130
- -------------
134
+ ## Version 1.8.0
131
135
  * [#1119](https://github.com/Shopify/shopify-cli/pull/1119): Enable guest serialization for scripts
132
136
 
133
- Version 1.7.1
134
- ------
137
+ ## Version 1.7.1
138
+
135
139
  * Updating internal features in development
136
140
 
137
- Version 1.7.0
138
- -----
141
+ ## Version 1.7.0
139
142
  * [#1109](https://github.com/Shopify/shopify-cli/pull/1109): Abort app generation if name contains disallowed text.
140
143
  * [#1075](https://github.com/Shopify/shopify-cli/pull/1075): Add support for kebab-case flags
141
144
 
142
- Version 1.6.0
143
- -----
145
+ ## Version 1.6.0
144
146
  * [#1049](https://github.com/Shopify/shopify-cli/pull/1049): Add schema versioning support to the script project type
145
147
  * [#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
146
148
  * [#1046](https://github.com/Shopify/shopify-cli/pull/1046): Include a vendored copy of Webrick, as it's no longer included in Ruby 3.
147
149
  * [#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.
148
150
  * [#1034](https://github.com/Shopify/shopify-cli/pull/1034): Abort if a system call fails.
149
151
 
150
- Version 1.5.0
151
- -----
152
+ ## Version 1.5.0
152
153
  * [#965](https://github.com/Shopify/shopify-cli/pull/965): Remove --no-optional when using npm to create new project
153
154
  * [#958](https://github.com/Shopify/shopify-cli/pull/958): Split `connect` command into project-specific functionality
154
155
  * [#992](https://github.com/Shopify/shopify-cli/pull/992): Add Theme Kit functionality to CLI
155
156
 
156
- Version 1.4.1
157
- ------
157
+ ## Version 1.4.1
158
+
158
159
  * [#917](https://github.com/Shopify/shopify-cli/pull/917): Ensure analytics for create action includes the same fields as other commands
159
160
 
160
- Version 1.4.0
161
- ------
161
+ ## Version 1.4.0
162
+
162
163
  * Updates to tests, dependencies and internal tooling
163
164
  * [#924](https://github.com/Shopify/shopify-cli/pull/924): Improve debugging messages on Partner API errors
164
165
 
165
- Version 1.3.1
166
- ------
166
+ ## Version 1.3.1
167
+
167
168
  * Allow any characters in ngrok account names
168
169
 
169
- Version 1.3.0
170
- ------
170
+ ## Version 1.3.0
171
171
  * Support for new `shopify config analytics` command to enable/disable anonymous usage reporting
172
172
 
173
173
  Version 1.2.0
@@ -182,49 +182,39 @@ Version 1.1.1
182
182
  ------
183
183
  * Fix a bug where usernames with spaces caused issues on Windows
184
184
 
185
- Version 1.1.0
186
- ------
185
+ ## Version 1.1.0
187
186
  * Add native Windows 10 support, including variety of stability fixes.
188
187
 
189
- Version 1.0.5
190
- ------
188
+ ## Version 1.0.5
191
189
  * Fix a bug in out opt-in metrics
192
190
 
193
- Version 1.0.4
194
- ------
191
+ ## Version 1.0.4
195
192
  * Fix a bug when running the `connect` command with an account with multiple organizations
196
193
 
197
- Version 1.0.3
198
- ------
194
+ ## Version 1.0.3
199
195
  * Fix a bug which causes an error in the `populate` and `generate` commands when prompting for the shop name
200
196
 
201
- Version 1.0.2
202
- ------
197
+ ## Version 1.0.2
203
198
  * Fix missing shop parameter to AdminAPI.query() call (impacting populate and generate commands)
204
199
 
205
- Version 1.0.1
206
- ------
200
+ ## Version 1.0.1
207
201
  * Fixed an issue with RVM taking over the shell shim fd when it was not in use
208
202
 
209
- Version 1.0.0
210
- ------
203
+ ## Version 1.0.0
211
204
  * Release the installer-based version of the CLI
212
205
 
213
- Version 0.9.3 - Internal Test Version
214
- ------
206
+ ## Version 0.9.3 - Internal Test Version
215
207
  * Rebased to master
216
208
  * Removed auto-generated files from builds directory
217
209
 
218
- Version 0.9.2 - Internal Test Version
219
- ------
210
+ ## Version 0.9.2 - Internal Test Version
220
211
  * Rebased to master, to pull in 7+ Pull Requests
221
212
  * Updates to dependencies to package files (updated Ruby version)
222
213
 
223
- Version 0.9.1 - Internal Test Version
224
- ------
214
+ ## Version 0.9.1 - Internal Test Version
225
215
  * Updated required Ruby version for the CLI
226
216
  * Minor fixes for the build / release process
227
217
 
228
- Version 0.9.0 - Internal Test Version
229
- ------
218
+ ## Version 0.9.0 - Internal Test Version
219
+
230
220
  * Initial test release of gem-based CLI
data/CONTRIBUTING.md CHANGED
@@ -13,7 +13,7 @@ Most of the internal components the project uses have unit tests to thoroughly t
13
13
 
14
14
  Acceptance tests run the built `shopify` command line against a wide range of fixtures and verify its output and results. They are the slowest to run however provide the most coverage. The idea is to test a few complete scenarios for each major feature.
15
15
 
16
- Those are written in [Cucumber](https://cucumber.io/) and Ruby and can be found in the [`features/`](/features) directory. They can be executed by running
16
+ Those are written in [Cucumber](https://cucumber.io/) and Ruby and can be found in the [`features/`](/features) directory. They can be executed by running:
17
17
 
18
18
  ```bash
19
19
  bundle exec cucumber
@@ -21,3 +21,11 @@ bundle exec cucumber features/theme.feature:3 # A specific test
21
21
  ```
22
22
 
23
23
  > **Note** that we currently don't have an approach for stubbing the interactions with the GraphQL APIs and that therefore we can't write acceptance tests for commands that interact with APIs.
24
+
25
+ #### Debugging acceptance tests
26
+ When developing acceptance tests, it can be helpful to see the outputs of running commands.
27
+ To see outputs, append `--verbose` when running an acceptance test. Example:
28
+
29
+ ```sh
30
+ bundle exec cucumber features/theme.feature --verbose
31
+ ```
data/Dockerfile CHANGED
@@ -1,17 +1,35 @@
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"
8
8
 
9
- # throw errors if Gemfile has been modified since Gemfile.lock
10
- RUN bundle config --global frozen 1
9
+ RUN gem update bundler
11
10
 
12
11
  WORKDIR /usr/src/app
13
12
 
14
13
  COPY Gemfile Gemfile.lock ./
15
14
  COPY shopify-cli.gemspec shopify-cli.gemspec
16
15
  COPY lib/shopify_cli/version.rb lib/shopify_cli/version.rb
17
- RUN bundle install
16
+ RUN bundle install
17
+
18
+ # Update git
19
+ RUN sudo add-apt-repository -y ppa:git-core/ppa
20
+ RUN sudo apt-get update
21
+ RUN sudo apt-get install git -y
22
+
23
+ # Install the latest version of NodeJS
24
+ RUN sudo apt-get install ca-certificates -y
25
+ RUN curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
26
+ RUN sudo apt-get install -y nodejs
27
+
28
+ # Install the latest version of Yarn
29
+ RUN sudo npm install --global yarn
30
+
31
+ # Python is necessary to compile NPM packages with native extensions through node-gyp
32
+ RUN sudo apt install python-minimal -y
33
+
34
+ # Install sqlite3
35
+ RUN sudo apt-get install libsqlite3-dev -y
data/Gemfile CHANGED
@@ -13,6 +13,8 @@ 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"
17
+ gem "colorize", "~> 0.8.1"
16
18
  end
17
19
 
18
20
  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.2)
4
+ shopify-cli (2.6.6)
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/
@@ -18,6 +18,7 @@ GEM
18
18
  builder (3.2.4)
19
19
  byebug (11.1.3)
20
20
  coderay (1.1.3)
21
+ colorize (0.8.1)
21
22
  concurrent-ruby (1.1.9)
22
23
  crack (0.4.5)
23
24
  rexml
@@ -56,6 +57,7 @@ GEM
56
57
  fakefs (1.3.2)
57
58
  ffi (1.15.4)
58
59
  hashdiff (1.0.1)
60
+ iniparse (1.5.0)
59
61
  liquid (5.1.0)
60
62
  listen (3.7.0)
61
63
  rb-fsevent (~> 0.10, >= 0.10.3)
@@ -134,8 +136,10 @@ PLATFORMS
134
136
  DEPENDENCIES
135
137
  bundler (~> 2.2.2)
136
138
  byebug
139
+ colorize (~> 0.8.1)
137
140
  cucumber (~> 7.0)
138
141
  fakefs (>= 1.0)
142
+ iniparse (~> 1.5)
139
143
  minitest (>= 5.0.0)
140
144
  minitest-fail-fast
141
145
  minitest-reporters
@@ -151,4 +155,4 @@ DEPENDENCIES
151
155
  webmock
152
156
 
153
157
  BUNDLED WITH
154
- 2.2.22
158
+ 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
@@ -43,6 +43,7 @@ module Extension
43
43
  autoload :GetProduct, Project.project_filepath("tasks/get_product")
44
44
  autoload :RunExtensionCommand, Project.project_filepath("tasks/run_extension_command")
45
45
  autoload :LoadServerConfig, Project.project_filepath("tasks/load_server_config")
46
+ autoload :FindPackageFromJson, Project.project_filepath("tasks/find_package_from_json.rb")
46
47
 
47
48
  module Converters
48
49
  autoload :RegistrationConverter, Project.project_filepath("tasks/converters/registration_converter")
@@ -11,6 +11,7 @@ module Extension
11
11
 
12
12
  options do |parser, flags|
13
13
  parser.on("--name=NAME") { |name| flags[:name] = name }
14
+ parser.on("--template=TEMPLATE") { |template| flags[:template] = template }
14
15
  parser.on("--type=TYPE") { |type| flags[:type] = type.upcase }
15
16
  parser.on("--api-key=KEY") { |key| flags[:api_key] = key.downcase }
16
17
  parser.on("--getting-started") { flags[:getting_started] = true }
@@ -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
@@ -42,14 +48,7 @@ module Extension
42
48
  end
43
49
 
44
50
  def renderer_package(context)
45
- js_system = ShopifyCLI::JsSystem.new(ctx: context)
46
- Tasks::FindNpmPackages
47
- .exactly_one_of(renderer_package_name, js_system: js_system, production_only: true)
48
- .unwrap { |err| raise err }
49
- rescue Extension::PackageResolutionFailed
50
- context.abort(
51
- context.message("features.argo.dependencies.argo_missing_renderer_package_error")
52
- )
51
+ Tasks::FindPackageFromJson.call(renderer_package_name, context: context)
53
52
  end
54
53
 
55
54
  private