shopify-cli 2.35.0 → 2.36.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7ff4aa2c4934ffc7d8ea74b5411396057302d3c689de0118e8d575dffe1f80e
4
- data.tar.gz: 3f6c1e379cf651d615f12f399bb219f791cf9881e910f0b253a2d7511acdb3af
3
+ metadata.gz: ade7adf91cbeb9a2dd8a02b15189641ccefc1b936f6a7f1621018c6bbd9b6197
4
+ data.tar.gz: 2a260ea255710a59c3062189561a367a6a97738c4c29d8d2df4aae75d9a28ad0
5
5
  SHA512:
6
- metadata.gz: 63f11f8ba2303796b678fcc0a0b30163ec556bdb3551ed6b3f0b036e2bf2564c9c8adfde10a23d9cd45bfaa67f5fcff678fc25055243edd2b99c2445fbb7a8e7
7
- data.tar.gz: eca42fd71a12ed6fd22547b55590c2bcf64e0ed675420478de0b771e9483d4a42e5c959d967a301cc5814b7393ca51b29444cbd4873349249122f3af9d962e1d
6
+ metadata.gz: 8472b9e1cf6c57b9f469d75c1df4f8aaf4b6942746a6cb20b20b67853d8a7f64775f236074251fbb344d20e7befaee54334f85ad69f30fd1d381cebab2da7986
7
+ data.tar.gz: 29cb2ad9e92906a3e0cec7903d2ed1a072b81133a0a623492c9210a9795257648a768221c6955b3eaa302b949ee44ecf61a37b24cfaed165aae7b654a1625788
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## Version 2.36.0 - 2023-05-03
6
+
7
+ ### Fixed
8
+ * [#2735](https://github.com/Shopify/shopify-cli/pull/2735): Remove theme directory confirmation during tests and make confirmation dialogue respect `SHOPIFY_CLI_TTY` (from cli#1369)
9
+ * [#2737](https://github.com/Shopify/shopify-cli/pull/2737): Do not inject hot-reload code into web-pixels-manager sandbox (from cli#1568)
10
+
11
+ ### Added
12
+ * [#2735](https://github.com/Shopify/shopify-cli/pull/2735): Pass development theme from CLI 3’s to CLI 2’s local storage (from cli#1410)
13
+
5
14
  ## Version 2.35.0 - 2023-02-22
6
15
 
7
16
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.35.0)
4
+ shopify-cli (2.36.0)
5
5
  bugsnag (~> 6.22)
6
6
  listen (~> 3.7.0)
7
7
  theme-check (~> 1.14.0)
@@ -19,7 +19,6 @@ module Extension
19
19
  class Command < ShopifyCLI::Command::ProjectCommand
20
20
  autoload :ExtensionCommand, Project.project_filepath("commands/extension_command")
21
21
 
22
- subcommand :Create, "create", Project.project_filepath("commands/create")
23
22
  subcommand :Register, "register", Project.project_filepath("commands/register")
24
23
  subcommand :Info, "info", Project.project_filepath("commands/info")
25
24
  subcommand :Connect, "connect", Project.project_filepath("commands/connect")
@@ -49,13 +49,14 @@ module Theme
49
49
  private
50
50
 
51
51
  def current_directory_confirmed?
52
- raise "Current theme directory can't be confirmed during tests" if @ctx.testing?
52
+ return true if options.flags[:force]
53
53
 
54
+ @ctx.warn(@ctx.message("theme.current_directory_is_not_theme_directory"))
54
55
  Forms::ConfirmStore.ask(
55
56
  @ctx,
56
57
  [],
57
58
  title: @ctx.message("theme.confirm_current_directory"),
58
- force: options.flags[:force],
59
+ force: !ShopifyCLI::Environment.interactive?,
59
60
  ).confirmed?
60
61
  end
61
62
 
@@ -35,12 +35,18 @@ module Theme
35
35
  flags[:ignores] |= pattern
36
36
  end
37
37
  parser.on("-f", "--force") { flags[:force] = true }
38
+ parser.on("--development-theme-id=DEVELOPMENT_THEME_ID") do |development_theme_id|
39
+ flags[:development_theme_id] = development_theme_id.to_i
40
+ end
38
41
  end
39
42
 
40
43
  def call(_args, name)
41
44
  root = root_value(options, name)
42
45
  return if exist_and_not_empty?(root) && !valid_theme_directory?(root)
43
46
 
47
+ development_theme_id = options.flags[:development_theme_id]
48
+ ShopifyCLI::DB.set(development_theme_id: development_theme_id) unless development_theme_id.nil?
49
+
44
50
  delete = !options.flags[:nodelete]
45
51
  theme = find_theme(root, **options.flags)
46
52
  return if theme.nil?
@@ -40,12 +40,18 @@ module Theme
40
40
  flags[:ignores] |= pattern
41
41
  end
42
42
  parser.on("-f", "--force") { flags[:force] = true }
43
+ parser.on("--development-theme-id=DEVELOPMENT_THEME_ID") do |development_theme_id|
44
+ flags[:development_theme_id] = development_theme_id.to_i
45
+ end
43
46
  end
44
47
 
45
48
  def call(_args, name)
46
49
  root = root_value(options, name)
47
50
  return unless valid_theme_directory?(root)
48
51
 
52
+ development_theme_id = options.flags[:development_theme_id]
53
+ ShopifyCLI::DB.set(development_theme_id: development_theme_id) unless development_theme_id.nil?
54
+
49
55
  delete = !options.flags[:nodelete]
50
56
  theme = find_theme(root, **options.flags)
51
57
  return if theme.nil?
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Theme
3
4
  module Messages
4
5
  MESSAGES = {
@@ -18,8 +19,9 @@ module Theme
18
19
  ENSURE_USER
19
20
  stable_flag_suggestion: "If the current command isn't working as expected," \
20
21
  " we suggest re-running the command with the {{command: --stable}} flag",
21
- confirm_current_directory: "It doesn’t seem like you’re running this command in a theme directory. " \
22
- "Are you sure you want to proceed?",
22
+ current_directory_is_not_theme_directory: "It doesn’t seem like you’re running this command" \
23
+ " in a theme directory.",
24
+ confirm_current_directory: "Are you sure you want to proceed?",
23
25
  init: {
24
26
  help: <<~HELP,
25
27
  {{command:%s theme init}}: Clones a Git repository to use as a starting point for building a new theme.
@@ -4,7 +4,6 @@ module ShopifyCLI
4
4
  module Commands
5
5
  class App < ShopifyCLI::Command
6
6
  subcommand :Connect, "connect", "shopify_cli/commands/app/connect"
7
- subcommand :Create, "create", "shopify_cli/commands/app/create"
8
7
  subcommand :Deploy, "deploy", "shopify_cli/commands/app/deploy"
9
8
  subcommand :Open, "open", "shopify_cli/commands/app/open"
10
9
  subcommand :Serve, "serve", "shopify_cli/commands/app/serve"
@@ -47,7 +47,7 @@ module ShopifyCLI
47
47
  end
48
48
 
49
49
  def leads_to_injectable_body?(path)
50
- path !~ /web-pixels-manager.+sandbox/
50
+ path !~ /.+\/sandbox/
51
51
  end
52
52
 
53
53
  def inject_hot_reload_javascript(body)
@@ -1,3 +1,3 @@
1
1
  module ShopifyCLI
2
- VERSION = "2.35.0"
2
+ VERSION = "2.36.0"
3
3
  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.35.0
4
+ version: 2.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-22 00:00:00.000000000 Z
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -690,7 +690,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
690
690
  - !ruby/object:Gem::Version
691
691
  version: '0'
692
692
  requirements: []
693
- rubygems_version: 3.3.3
693
+ rubygems_version: 3.4.12
694
694
  signing_key:
695
695
  specification_version: 4
696
696
  summary: Shopify CLI helps you build Shopify apps faster.