shopify-cli 2.13.0 → 2.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +5 -0
  3. data/.github/CONTRIBUTING.md +1 -1
  4. data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
  5. data/.github/workflows/stale.yml +46 -0
  6. data/CHANGELOG.md +36 -0
  7. data/Gemfile +1 -0
  8. data/Gemfile.lock +43 -11
  9. data/Rakefile +43 -0
  10. data/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +1 -0
  11. data/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +1 -0
  12. data/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +1 -0
  13. data/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +1 -0
  14. data/ext/javy/version +1 -1
  15. data/ext/shopify-extensions/version +1 -1
  16. data/lib/project_types/extension/forms/questions/ask_template.rb +5 -8
  17. data/lib/project_types/extension/messages/messages.rb +10 -0
  18. data/lib/project_types/extension/models/development_server_requirements.rb +13 -7
  19. data/lib/project_types/extension/models/npm_package.rb +19 -1
  20. data/lib/project_types/extension/models/server_config/development_renderer.rb +4 -3
  21. data/lib/project_types/extension/models/server_config/root.rb +2 -0
  22. data/lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb +13 -0
  23. data/lib/project_types/script/cli.rb +0 -4
  24. data/lib/project_types/script/config/extension_points.yml +18 -6
  25. data/lib/project_types/script/layers/application/build_script.rb +3 -18
  26. data/lib/project_types/script/layers/application/push_script.rb +12 -10
  27. data/lib/project_types/script/layers/infrastructure/languages/project_creator.rb +0 -1
  28. data/lib/project_types/script/layers/infrastructure/languages/task_runner.rb +0 -1
  29. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +2 -10
  30. data/lib/project_types/script/layers/infrastructure/languages/wasm_task_runner.rb +1 -1
  31. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +1 -23
  32. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +1 -1
  33. data/lib/project_types/script/messages/messages.rb +2 -2
  34. data/lib/project_types/theme/commands/package.rb +1 -0
  35. data/lib/project_types/theme/commands/pull.rb +2 -2
  36. data/lib/project_types/theme/commands/push.rb +2 -2
  37. data/lib/project_types/theme/conversions/base_glob.rb +20 -5
  38. data/lib/project_types/theme/messages/messages.rb +9 -0
  39. data/lib/shopify_cli/changelog.rb +76 -0
  40. data/lib/shopify_cli/command.rb +8 -7
  41. data/lib/shopify_cli/commands/app/deploy.rb +0 -1
  42. data/lib/shopify_cli/context.rb +2 -2
  43. data/lib/shopify_cli/core/entry_point.rb +1 -1
  44. data/lib/shopify_cli/core/monorail.rb +14 -6
  45. data/lib/shopify_cli/environment.rb +19 -11
  46. data/lib/shopify_cli/exception_reporter.rb +2 -0
  47. data/lib/shopify_cli/messages/messages.rb +11 -5
  48. data/lib/shopify_cli/packager.rb +1 -1
  49. data/lib/shopify_cli/release.rb +94 -0
  50. data/lib/shopify_cli/result.rb +14 -0
  51. data/lib/shopify_cli/sed.rb +19 -0
  52. data/lib/shopify_cli/services/app/create/node_service.rb +2 -14
  53. data/lib/shopify_cli/services/app/create/php_service.rb +1 -6
  54. data/lib/shopify_cli/services/app/create/rails_service.rb +4 -12
  55. data/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +5 -5
  56. data/lib/shopify_cli/theme/dev_server/watcher.rb +10 -2
  57. data/lib/shopify_cli/theme/development_theme.rb +2 -5
  58. data/lib/shopify_cli/theme/syncer.rb +20 -25
  59. data/lib/shopify_cli/theme/theme.rb +28 -31
  60. data/lib/shopify_cli/theme/theme_admin_api.rb +72 -0
  61. data/lib/shopify_cli/transform_data_structure.rb +3 -2
  62. data/lib/shopify_cli/tunnel.rb +9 -0
  63. data/lib/shopify_cli/version.rb +1 -1
  64. data/shipit.yml +3 -0
  65. data/shopify-cli.gemspec +12 -3
  66. metadata +18 -10
  67. data/lib/project_types/rails/ruby.rb +0 -17
  68. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb +0 -36
  69. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +0 -109
@@ -88,24 +88,12 @@ module ShopifyCLI
88
88
  end
89
89
 
90
90
  def check_node
91
- cmd_path = context.which("node")
92
- context.abort(context.message("core.app.create.node.error.node_required")) if cmd_path.nil?
93
-
94
- version, stat = context.capture2e("node", "-v")
95
- unless stat.success?
96
- context.abort(context.message("core.app.create.node.error.node_version_failure"))
97
- end
98
-
91
+ version = ShopifyCLI::Environment.node_version(context: context)
99
92
  context.done(context.message("core.app.create.node.node_version", version))
100
93
  end
101
94
 
102
95
  def check_npm
103
- cmd_path = context.which("npm")
104
- context.abort(context.message("core.app.create.node.error.npm_required")) if cmd_path.nil?
105
-
106
- version, stat = context.capture2e("npm", "-v")
107
- context.abort(context.message("core.app.create.node.error.npm_version_failure")) unless stat.success?
108
-
96
+ version = ShopifyCLI::Environment.npm_version(context: context)
109
97
  context.done(context.message("core.app.create.node.npm_version", version))
110
98
  end
111
99
 
@@ -69,12 +69,7 @@ module ShopifyCLI
69
69
  end
70
70
 
71
71
  def check_npm
72
- cmd_path = context.which("npm")
73
- context.abort(context.message("core.app.create.php.error.npm_required")) if cmd_path.nil?
74
-
75
- version, stat = context.capture2e("npm", "-v")
76
- context.abort(context.message("core.app.create.php.error.npm_version_failure")) unless stat.success?
77
-
72
+ version = ShopifyCLI::Environment.npm_version(context: context)
78
73
  context.done(context.message("core.app.create.php.npm_version", version))
79
74
  end
80
75
 
@@ -108,7 +108,7 @@ module ShopifyCLI
108
108
  end
109
109
 
110
110
  def check_ruby
111
- ruby_version = Rails::Ruby.version(context)
111
+ ruby_version = Environment.ruby_version(context: context)
112
112
  return if ruby_version.satisfies?("~>2.5") || ruby_version.satisfies?("~>3.1.0")
113
113
  context.abort(context.message("core.app.create.rails.error.invalid_ruby_version"))
114
114
  end
@@ -219,18 +219,10 @@ module ShopifyCLI
219
219
  end
220
220
 
221
221
  def install_webpacker?
222
- rails_version < ::Semantic::Version.new("7.0.0") &&
223
- !File.exist?(File.join(context.root, "config/webpacker.yml"))
224
- end
225
-
226
- def rails_version
227
- output, status = context.capture2e("rails", "--version")
228
- unless status.success?
229
- context.abort(context.message("core.app.create.rails.error.install_failure", "rails"))
230
- end
222
+ rails_version = Environment.rails_version(context: context)
223
+ webpacker_config = File.exist?(File.join(context.root, "config/webpacker.yml"))
231
224
 
232
- version = output.scan(/Rails \d+\.\d+\.\d+/).first.split(" ").last
233
- ::Semantic::Version.new(version)
225
+ rails_version < ::Semantic::Version.new("7.0.0") && !webpacker_config
234
226
  end
235
227
  end
236
228
  end
@@ -28,6 +28,10 @@ module ShopifyCLI
28
28
 
29
29
  private
30
30
 
31
+ def api_client
32
+ @api_client ||= ThemeAdminAPI.new(@ctx, @theme.shop)
33
+ end
34
+
31
35
  def updated_file?(body, file)
32
36
  remote_checksum = body.dig("asset", "checksum")
33
37
  local_checksum = file.checksum
@@ -45,12 +49,8 @@ module ShopifyCLI
45
49
  end
46
50
 
47
51
  def fetch_asset(file)
48
- ShopifyCLI::AdminAPI.rest_request(
49
- @ctx,
50
- shop: @theme.shop,
52
+ api_client.get(
51
53
  path: "themes/#{@theme.id}/assets.json",
52
- method: "GET",
53
- api_version: "unstable",
54
54
  query: URI.encode_www_form("asset[key]" => file.relative_path.to_s),
55
55
  )
56
56
  rescue ShopifyCLI::API::APIRequestNotFoundError
@@ -45,13 +45,21 @@ module ShopifyCLI
45
45
  def filter_theme_files(files)
46
46
  files
47
47
  .select { |file| @theme.theme_file?(file) }
48
- .reject { |file| @ignore_filter&.ignore?(file) }
48
+ .map { |file| @theme[file] }
49
+ .reject { |file| ignore_file?(file) }
49
50
  end
50
51
 
51
52
  def filter_remote_files(files)
52
53
  files
53
54
  .select { |file| @syncer.remote_file?(file) }
54
- .reject { |file| @ignore_filter&.ignore?(file) }
55
+ .map { |file| @theme[file] }
56
+ .reject { |file| ignore_file?(file) }
57
+ end
58
+
59
+ private
60
+
61
+ def ignore_file?(file)
62
+ @ignore_filter&.ignore?(file.relative_path.to_s)
55
63
  end
56
64
  end
57
65
  end
@@ -45,11 +45,8 @@ module ShopifyCLI
45
45
  def exists?
46
46
  return false unless id
47
47
 
48
- ShopifyCLI::AdminAPI.rest_request(
49
- @ctx,
50
- shop: shop,
51
- path: "themes/#{id}.json",
52
- api_version: "unstable",
48
+ api_client.get(
49
+ path: "themes/#{id}.json"
53
50
  )
54
51
  rescue ShopifyCLI::API::APIRequestNotFoundError
55
52
  false
@@ -7,15 +7,15 @@ require "forwardable"
7
7
  require_relative "syncer/error_reporter"
8
8
  require_relative "syncer/standard_reporter"
9
9
  require_relative "syncer/operation"
10
+ require_relative "theme_admin_api"
10
11
 
11
12
  module ShopifyCLI
12
13
  module Theme
13
14
  class Syncer
14
15
  extend Forwardable
15
16
 
16
- API_VERSION = "unstable"
17
-
18
17
  attr_reader :checksums
18
+ attr_reader :checksums_mutex
19
19
  attr_accessor :include_filter
20
20
  attr_accessor :ignore_filter
21
21
 
@@ -39,6 +39,9 @@ module ShopifyCLI
39
39
  # Mutex used to pause all threads when backing-off when hitting API rate limits
40
40
  @backoff_mutex = Mutex.new
41
41
 
42
+ # Mutex used to coordinate changes in the checksums (shared accross all threads)
43
+ @checksums_mutex = Mutex.new
44
+
42
45
  # Latest theme assets checksums. Updated on each upload.
43
46
  @checksums = {}
44
47
 
@@ -46,6 +49,10 @@ module ShopifyCLI
46
49
  @error_checksums = []
47
50
  end
48
51
 
52
+ def api_client
53
+ @api_client ||= ThemeAdminAPI.new(@ctx, @theme.shop)
54
+ end
55
+
49
56
  def lock_io!
50
57
  @reporters.each(&:disable!)
51
58
  end
@@ -96,11 +103,8 @@ module ShopifyCLI
96
103
  end
97
104
 
98
105
  def fetch_checksums!
99
- _status, response = ShopifyCLI::AdminAPI.rest_request(
100
- @ctx,
101
- shop: @theme.shop,
102
- path: "themes/#{@theme.id}/assets.json",
103
- api_version: API_VERSION,
106
+ _status, response = api_client.get(
107
+ path: "themes/#{@theme.id}/assets.json"
104
108
  )
105
109
  update_checksums(response)
106
110
  end
@@ -239,12 +243,8 @@ module ShopifyCLI
239
243
  asset[:attachment] = Base64.encode64(file.read)
240
244
  end
241
245
 
242
- _status, body, response = ShopifyCLI::AdminAPI.rest_request(
243
- @ctx,
244
- shop: @theme.shop,
246
+ _status, body, response = api_client.put(
245
247
  path: "themes/#{@theme.id}/assets.json",
246
- method: "PUT",
247
- api_version: API_VERSION,
248
248
  body: JSON.generate(asset: asset)
249
249
  )
250
250
 
@@ -272,16 +272,12 @@ module ShopifyCLI
272
272
  end
273
273
 
274
274
  def ignored_by_include_filter?(path)
275
- include_filter && !include_filter.match?(path)
275
+ !!include_filter && !include_filter.match?(path)
276
276
  end
277
277
 
278
278
  def get(file)
279
- _status, body, response = ShopifyCLI::AdminAPI.rest_request(
280
- @ctx,
281
- shop: @theme.shop,
279
+ _status, body, response = api_client.get(
282
280
  path: "themes/#{@theme.id}/assets.json",
283
- method: "GET",
284
- api_version: API_VERSION,
285
281
  query: URI.encode_www_form("asset[key]" => file.relative_path.to_s),
286
282
  )
287
283
 
@@ -298,12 +294,8 @@ module ShopifyCLI
298
294
  end
299
295
 
300
296
  def delete(file)
301
- _status, _body, response = ShopifyCLI::AdminAPI.rest_request(
302
- @ctx,
303
- shop: @theme.shop,
297
+ _status, _body, response = api_client.delete(
304
298
  path: "themes/#{@theme.id}/assets.json",
305
- method: "DELETE",
306
- api_version: API_VERSION,
307
299
  body: JSON.generate(asset: {
308
300
  key: file.relative_path.to_s,
309
301
  })
@@ -314,14 +306,17 @@ module ShopifyCLI
314
306
 
315
307
  def update_checksums(api_response)
316
308
  api_response.values.flatten.each do |asset|
317
- if asset["key"]
309
+ next unless asset["key"]
310
+ checksums_mutex.synchronize do
318
311
  @checksums[asset["key"]] = asset["checksum"]
319
312
  end
320
313
  end
321
314
  # Generate .liquid asset files are reported twice in checksum:
322
315
  # once of generated, once for .liquid. We only keep the .liquid, that's the one we have
323
316
  # on disk.
324
- @checksums.reject! { |key, _| @checksums.key?("#{key}.liquid") }
317
+ checksums_mutex.synchronize do
318
+ @checksums.reject! { |key, _| @checksums.key?("#{key}.liquid") }
319
+ end
325
320
  end
326
321
 
327
322
  def file_has_changed?(file)
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require_relative "file"
3
+ require_relative "theme_admin_api"
3
4
 
4
5
  require "pathname"
5
6
  require "time"
@@ -20,11 +21,11 @@ module ShopifyCLI
20
21
  end
21
22
 
22
23
  def theme_files
23
- glob(["**/*.liquid", "**/*.json", "assets/*"]).uniq
24
+ (glob(["**/*.liquid", "**/*.json"]) + static_asset_files).uniq
24
25
  end
25
26
 
26
27
  def static_asset_files
27
- glob("assets/*").reject(&:liquid?)
28
+ glob("assets/*", raise_on_dir: true).reject(&:liquid?)
28
29
  end
29
30
 
30
31
  def liquid_files
@@ -35,8 +36,11 @@ module ShopifyCLI
35
36
  glob("**/*.json")
36
37
  end
37
38
 
38
- def glob(pattern)
39
- root.glob(pattern).map { |path| File.new(path, root) }
39
+ def glob(pattern, raise_on_dir: false)
40
+ root.glob(pattern).map do |path|
41
+ abort_if_directory!(path) if raise_on_dir
42
+ File.new(path, root)
43
+ end
40
44
  end
41
45
 
42
46
  def theme_file?(file)
@@ -59,7 +63,7 @@ module ShopifyCLI
59
63
  end
60
64
 
61
65
  def shop
62
- AdminAPI.get_shop_or_abort(@ctx)
66
+ api_client.get_shop_or_abort
63
67
  end
64
68
 
65
69
  def editor_url
@@ -101,9 +105,7 @@ module ShopifyCLI
101
105
  def create
102
106
  raise InvalidThemeRole, "Can't create live theme. Use publish." if live?
103
107
 
104
- _status, body = ShopifyCLI::AdminAPI.rest_request(
105
- @ctx,
106
- shop: shop,
108
+ _status, body = api_client.post(
107
109
  path: "themes.json",
108
110
  body: JSON.generate({
109
111
  theme: {
@@ -111,31 +113,21 @@ module ShopifyCLI
111
113
  role: role,
112
114
  },
113
115
  }),
114
- method: "POST",
115
- api_version: "unstable",
116
116
  )
117
117
 
118
118
  @id = body["theme"]["id"]
119
119
  end
120
120
 
121
121
  def delete
122
- AdminAPI.rest_request(
123
- @ctx,
124
- shop: shop,
125
- method: "DELETE",
126
- path: "themes/#{id}.json",
127
- api_version: "unstable",
122
+ api_client.delete(
123
+ path: "themes/#{id}.json"
128
124
  )
129
125
  end
130
126
 
131
127
  def publish
132
128
  return if live?
133
- AdminAPI.rest_request(
134
- @ctx,
135
- shop: shop,
136
- method: "PUT",
129
+ api_client.put(
137
130
  path: "themes/#{id}.json",
138
- api_version: "unstable",
139
131
  body: JSON.generate(theme: {
140
132
  role: "main",
141
133
  })
@@ -205,23 +197,23 @@ module ShopifyCLI
205
197
  end
206
198
 
207
199
  def fetch_themes(ctx)
208
- AdminAPI.rest_request(
209
- ctx,
210
- shop: AdminAPI.get_shop_or_abort(ctx),
211
- path: "themes.json",
212
- api_version: "unstable",
200
+ api_client = ThemeAdminAPI.new(ctx)
201
+
202
+ api_client.get(
203
+ path: "themes.json"
213
204
  )
214
205
  end
215
206
  end
216
207
 
217
208
  private
218
209
 
210
+ def api_client
211
+ @api_client ||= ThemeAdminAPI.new(@ctx)
212
+ end
213
+
219
214
  def load_info_from_api
220
- _status, body = AdminAPI.rest_request(
221
- @ctx,
222
- shop: shop,
223
- path: "themes/#{id}.json",
224
- api_version: "unstable",
215
+ _status, body = api_client.get(
216
+ path: "themes/#{id}.json"
225
217
  )
226
218
 
227
219
  @name = body.dig("theme", "name")
@@ -229,6 +221,11 @@ module ShopifyCLI
229
221
 
230
222
  self
231
223
  end
224
+
225
+ def abort_if_directory!(path)
226
+ return unless ::File.directory?(path)
227
+ @ctx.abort(@ctx.message("theme.serve.error.invalid_subdirectory", path.to_s))
228
+ end
232
229
  end
233
230
  end
234
231
  end
@@ -0,0 +1,72 @@
1
+ module ShopifyCLI
2
+ module Theme
3
+ class ThemeAdminAPI
4
+ API_VERSION = "unstable"
5
+
6
+ attr_reader :shop
7
+
8
+ def initialize(ctx, shop = nil)
9
+ @ctx = ctx
10
+ @shop = shop || get_shop_or_abort
11
+ end
12
+
13
+ def get(path:, **args)
14
+ rest_request(method: "GET", path: path, **args)
15
+ end
16
+
17
+ def put(path:, **args)
18
+ rest_request(method: "PUT", path: path, **args)
19
+ end
20
+
21
+ def post(path:, **args)
22
+ rest_request(method: "POST", path: path, **args)
23
+ end
24
+
25
+ def delete(path:, **args)
26
+ rest_request(method: "DELETE", path: path, **args)
27
+ end
28
+
29
+ def get_shop_or_abort # rubocop:disable Naming/AccessorMethodName
30
+ ShopifyCLI::AdminAPI.get_shop_or_abort(@ctx)
31
+ end
32
+
33
+ private
34
+
35
+ def rest_request(**args)
36
+ ShopifyCLI::AdminAPI.rest_request(
37
+ @ctx,
38
+ shop: @shop,
39
+ api_version: API_VERSION,
40
+ **args.compact
41
+ )
42
+ rescue ShopifyCLI::API::APIRequestForbiddenError,
43
+ ShopifyCLI::API::APIRequestUnauthorizedError => error
44
+ # The Admin API returns 403 Forbidden responses on different
45
+ # scenarios:
46
+ #
47
+ # * when a user doesn't have permissions for a request:
48
+ # <APIRequestForbiddenError: 403 {}>
49
+ #
50
+ # * when an asset operation cannot be performed:
51
+ # <APIRequestForbiddenError: 403 {"message":"templates/gift_card.liquid could not be deleted"}>
52
+ if empty_response_error?(error)
53
+ return handle_permissions_error
54
+ end
55
+
56
+ raise error
57
+ end
58
+
59
+ def handle_permissions_error
60
+ ensure_user_error = @ctx.message("theme.ensure_user_error", shop)
61
+ ensure_user_try_this = @ctx.message("theme.ensure_user_try_this")
62
+
63
+ @ctx.abort(ensure_user_error, ensure_user_try_this)
64
+ end
65
+
66
+ def empty_response_error?(error)
67
+ error_message = error&.response&.body.to_s
68
+ error_message.empty?
69
+ end
70
+ end
71
+ end
72
+ end
@@ -40,6 +40,7 @@ module ShopifyCLI
40
40
 
41
41
  property! :underscore_keys, accepts: [true, false], default: false, reader: :underscore_keys?
42
42
  property! :symbolize_keys, accepts: [true, false], default: false, reader: :symbolize_keys?
43
+ property! :shallow, accepts: [true, false], default: false, reader: :shallow?
43
44
  property! :associative_array_container,
44
45
  accepts: ->(c) { c.respond_to?(:new) && c.method_defined?(:[]=) },
45
46
  default: -> { Hash }
@@ -47,10 +48,10 @@ module ShopifyCLI
47
48
  def call(object)
48
49
  case object
49
50
  when Array
50
- object.map(&self).map(&:value)
51
+ shallow? ? object.dup : object.map(&self).map(&:value)
51
52
  when Hash
52
53
  object.each.with_object(associative_array_container.new) do |(key, value), result|
53
- result[transform_key(key)] = call(value).value
54
+ result[transform_key(key)] = shallow? ? value : call(value).value
54
55
  end
55
56
  else
56
57
  ShopifyCLI::Result.success(object)
@@ -178,6 +178,15 @@ module ShopifyCLI
178
178
 
179
179
  def fetch_url(ctx, log_path)
180
180
  LogParser.new(log_path)
181
+ rescue NgrokError => e
182
+ # Full error messages/descriptions: https://ngrok.com/docs/errors
183
+ case e.message
184
+ when /ERR_NGROK_107/
185
+ ctx.abort(ctx.message("tunnel.invalid_token", e.message))
186
+ when /ERR_NGROK_108/
187
+ ctx.abort(ctx.message("tunnel.duplicate_session", e.message))
188
+ end
189
+ raise e.class, e.message
181
190
  rescue RuntimeError => e
182
191
  stop(ctx)
183
192
  raise e.class, e.message
@@ -1,3 +1,3 @@
1
1
  module ShopifyCLI
2
- VERSION = "2.13.0"
2
+ VERSION = "2.15.1"
3
3
  end
data/shipit.yml ADDED
@@ -0,0 +1,3 @@
1
+ deploy:
2
+ post:
3
+ - bundle exec rake notify_version_to_bugsnag
data/shopify-cli.gemspec CHANGED
@@ -28,18 +28,27 @@ Gem::Specification.new do |spec|
28
28
  spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
29
29
  %x(git ls-files -z).split("\x0").reject do |f|
30
30
  f.match(%r{^(test|spec|features|packaging)/}) ||
31
- f.match(%r{^bin/(update-deps|shopify.bat)$})
31
+ f.match(%r{^bin/(update-deps|shopify.bat)$})
32
32
  end
33
33
  end
34
34
  spec.bindir = "bin"
35
35
  spec.require_paths = ["lib", "vendor"]
36
36
  spec.executables << "shopify"
37
37
 
38
- spec.add_development_dependency("bundler", "~> 2.2.2")
38
+ spec.add_development_dependency("bundler", "~> 2.3.8")
39
39
  spec.add_development_dependency("rake", "~> 12.3", ">= 12.3.3")
40
40
  spec.add_development_dependency("minitest", "~> 5.0")
41
41
 
42
42
  spec.add_dependency("bugsnag", "~> 6.22")
43
43
  spec.add_dependency("listen", "~> 3.7.0")
44
- spec.add_dependency("theme-check", "~> 1.9.0")
44
+
45
+ # We prefer being more strict here with the version range to have a more deterministic build.
46
+ # The added benefit is that, if the user upgrades the CLI, and we have "~> 1.10.1" version range,
47
+ # they will get a theme-check update.
48
+ # Whereas if we were to have "~> 1.9", that version would still be satisfied and thus not upgraded.
49
+ # Both shopify-cli and theme-check gems are owned and developed by Shopify.
50
+ # These gems are currently being actively developed and it's easiest to update them together.
51
+ spec.add_dependency("theme-check", "~> 1.10.1")
52
+
53
+ spec.extensions = ["ext/shopify-extensions/extconf.rb"]
45
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-02 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.2
19
+ version: 2.3.8
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.2
26
+ version: 2.3.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.9.0
95
+ version: 1.10.1
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.9.0
102
+ version: 1.10.1
103
103
  description: |
104
104
  Shopify CLI helps you build Shopify apps faster. It quickly scaffolds Node.js
105
105
  and Ruby on Rails embedded apps. It also automates many common tasks in the
@@ -109,7 +109,8 @@ email:
109
109
  - dev-tools-education@shopify.com
110
110
  executables:
111
111
  - shopify
112
- extensions: []
112
+ extensions:
113
+ - ext/shopify-extensions/extconf.rb
113
114
  extra_rdoc_files: []
114
115
  files:
115
116
  - ".devcontainer.json"
@@ -124,6 +125,7 @@ files:
124
125
  - ".github/PULL_REQUEST_TEMPLATE.md"
125
126
  - ".github/probots.yml"
126
127
  - ".github/workflows/shopify.yml"
128
+ - ".github/workflows/stale.yml"
127
129
  - ".github/workflows/triage.yml"
128
130
  - ".gitignore"
129
131
  - ".rubocop.yml"
@@ -155,12 +157,16 @@ files:
155
157
  - docs/users/migrate-from-themekit.md
156
158
  - ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256
157
159
  - ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256
160
+ - ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256
158
161
  - ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256
159
162
  - ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256
163
+ - ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256
160
164
  - ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256
161
165
  - ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256
166
+ - ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256
162
167
  - ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256
163
168
  - ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256
169
+ - ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256
164
170
  - ext/javy/javy.rb
165
171
  - ext/javy/version
166
172
  - ext/shopify-extensions/extconf.rb
@@ -283,7 +289,6 @@ files:
283
289
  - lib/project_types/rails/forms/create.rb
284
290
  - lib/project_types/rails/gem.rb
285
291
  - lib/project_types/rails/messages/messages.rb
286
- - lib/project_types/rails/ruby.rb
287
292
  - lib/project_types/script/cli.rb
288
293
  - lib/project_types/script/commands/connect.rb
289
294
  - lib/project_types/script/commands/create.rb
@@ -317,8 +322,6 @@ files:
317
322
  - lib/project_types/script/layers/infrastructure/command_runner.rb
318
323
  - lib/project_types/script/layers/infrastructure/errors.rb
319
324
  - lib/project_types/script/layers/infrastructure/extension_point_repository.rb
320
- - lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb
321
- - lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb
322
325
  - lib/project_types/script/layers/infrastructure/languages/project_creator.rb
323
326
  - lib/project_types/script/layers/infrastructure/languages/task_runner.rb
324
327
  - lib/project_types/script/layers/infrastructure/languages/tool_version_checker.rb
@@ -367,6 +370,7 @@ files:
367
370
  - lib/shopify_cli/admin_api/schema.rb
368
371
  - lib/shopify_cli/api.rb
369
372
  - lib/shopify_cli/app_type_detector.rb
373
+ - lib/shopify_cli/changelog.rb
370
374
  - lib/shopify_cli/command.rb
371
375
  - lib/shopify_cli/command/app_sub_command.rb
372
376
  - lib/shopify_cli/command/project_command.rb
@@ -442,11 +446,13 @@ files:
442
446
  - lib/shopify_cli/project.rb
443
447
  - lib/shopify_cli/project_commands.rb
444
448
  - lib/shopify_cli/project_type.rb
449
+ - lib/shopify_cli/release.rb
445
450
  - lib/shopify_cli/reporting_configuration_controller.rb
446
451
  - lib/shopify_cli/resolve_constant.rb
447
452
  - lib/shopify_cli/resources.rb
448
453
  - lib/shopify_cli/resources/env_file.rb
449
454
  - lib/shopify_cli/result.rb
455
+ - lib/shopify_cli/sed.rb
450
456
  - lib/shopify_cli/services.rb
451
457
  - lib/shopify_cli/services/app/connect_service.rb
452
458
  - lib/shopify_cli/services/app/create/node_service.rb
@@ -502,12 +508,14 @@ files:
502
508
  - lib/shopify_cli/theme/syncer/operation.rb
503
509
  - lib/shopify_cli/theme/syncer/standard_reporter.rb
504
510
  - lib/shopify_cli/theme/theme.rb
511
+ - lib/shopify_cli/theme/theme_admin_api.rb
505
512
  - lib/shopify_cli/thread_pool.rb
506
513
  - lib/shopify_cli/thread_pool/job.rb
507
514
  - lib/shopify_cli/transform_data_structure.rb
508
515
  - lib/shopify_cli/tunnel.rb
509
516
  - lib/shopify_cli/utilities.rb
510
517
  - lib/shopify_cli/version.rb
518
+ - shipit.yml
511
519
  - shopify-cli.gemspec
512
520
  - shopify-dev
513
521
  - utilities/constants.rb