climaybe 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -115,15 +115,21 @@ npx climaybe ensure-branches
115
115
  git push origin --all
116
116
  ```
117
117
 
118
- ### `climaybe update-workflows` / `climaybe theme update-workflows`
118
+ ### `climaybe update` / `climaybe theme update`
119
119
 
120
- Refresh GitHub Actions workflows from the latest bundled templates.
120
+ Refresh all climaybe-managed project files from your installed CLI version:
121
+ - GitHub workflows
122
+ - root dev-kit files (`.theme-check.yml`, `.shopifyignore`, `.prettierrc`, `.lighthouserc.js`, `.gitignore`)
123
+ - `package.json` managed deps (`climaybe`, `tailwindcss`)
124
+ - optional `.vscode/tasks.json` (if enabled)
125
+ - optional commitlint + Husky files (if enabled)
126
+ - optional Cursor bundle files (if enabled)
121
127
 
122
128
  ```bash
123
- npx climaybe update-workflows
129
+ npx climaybe update
124
130
  ```
125
131
 
126
- Useful after updating the CLI to get the latest workflow improvements.
132
+ `update-workflows` still works as a backward-compatible alias.
127
133
 
128
134
  ### `climaybe setup-commitlint`
129
135
 
@@ -141,7 +147,7 @@ Install Electric Maybe **Cursor rules, skills, and subagents** into `.cursor/rul
141
147
  npx climaybe add-cursor
142
148
  ```
143
149
 
144
- The previous command name `add-cursor-skill` still works as an alias. Re-running replaces the bundled rules, skills, and subagent files with the copies shipped by your installed climaybe version (same idea as `update-workflows`).
150
+ The previous command name `add-cursor-skill` still works as an alias. Re-running replaces the bundled rules, skills, and subagent files with the copies shipped by your installed climaybe version (same idea as `update`).
145
151
 
146
152
  ## Configuration
147
153
 
package/bin/version.txt CHANGED
@@ -1 +1 @@
1
- 3.0.2
1
+ 3.0.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "climaybe",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Shopify CLI by Electric Maybe for theme CI/CD workflows, branch orchestration, app setup, and dev tooling",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,10 +1,20 @@
1
1
  import pc from 'picocolors';
2
- import { getMode, isBuildWorkflowsEnabled, isPreviewWorkflowsEnabled, readConfig } from '../lib/config.js';
2
+ import {
3
+ getMode,
4
+ isBuildWorkflowsEnabled,
5
+ isCommitlintEnabled,
6
+ isCursorSkillsEnabled,
7
+ isPreviewWorkflowsEnabled,
8
+ readConfig,
9
+ } from '../lib/config.js';
3
10
  import { scaffoldWorkflows } from '../lib/workflows.js';
4
11
  import { requireThemeProject } from '../lib/theme-guard.js';
12
+ import { scaffoldThemeDevKit } from '../lib/theme-dev-kit.js';
13
+ import { scaffoldCommitlint } from '../lib/commit-tooling.js';
14
+ import { scaffoldCursorBundle } from '../lib/cursor-bundle.js';
5
15
 
6
- export async function updateWorkflowsCommand() {
7
- console.log(pc.bold('\n climaybe — Update Workflows\n'));
16
+ export async function updateCommand() {
17
+ console.log(pc.bold('\n climaybe — Update\n'));
8
18
 
9
19
  if (!requireThemeProject()) return;
10
20
 
@@ -17,7 +27,24 @@ export async function updateWorkflowsCommand() {
17
27
  const mode = getMode();
18
28
  const includePreview = isPreviewWorkflowsEnabled();
19
29
  const includeBuild = isBuildWorkflowsEnabled();
30
+
31
+ // Keep theme project files in sync (root files, package.json, .gitignore, VS Code tasks).
32
+ scaffoldThemeDevKit({
33
+ includeVSCodeTasks: !!config.vscode_tasks,
34
+ defaultStoreDomain: config.default_store || '',
35
+ });
36
+
37
+ if (isCommitlintEnabled()) {
38
+ scaffoldCommitlint(process.cwd(), { skipInstall: true });
39
+ }
40
+ if (isCursorSkillsEnabled()) {
41
+ scaffoldCursorBundle();
42
+ }
43
+
20
44
  scaffoldWorkflows(mode, { includePreview, includeBuild });
21
45
 
22
- console.log(pc.bold(pc.green('\n Workflows updated!\n')));
46
+ console.log(pc.bold(pc.green('\n Project files updated!\n')));
23
47
  }
48
+
49
+ // Backward-compatible export for old command name.
50
+ export const updateWorkflowsCommand = updateCommand;
package/src/index.js CHANGED
@@ -3,7 +3,7 @@ import { initCommand, reinitCommand } from './commands/init.js';
3
3
  import { addStoreCommand } from './commands/add-store.js';
4
4
  import { switchCommand } from './commands/switch.js';
5
5
  import { syncCommand } from './commands/sync.js';
6
- import { updateWorkflowsCommand } from './commands/update-workflows.js';
6
+ import { updateCommand } from './commands/update-workflows.js';
7
7
  import { ensureBranchesCommand } from './commands/ensure-branches.js';
8
8
  import { setupCommitlintCommand } from './commands/setup-commitlint.js';
9
9
  import { addCursorSkillCommand } from './commands/add-cursor-skill.js';
@@ -81,9 +81,10 @@ function registerThemeCommands(cmd) {
81
81
  .action(createEntrypointsCommand);
82
82
 
83
83
  cmd
84
- .command('update-workflows')
85
- .description('Refresh GitHub Actions workflows from latest bundled templates')
86
- .action(updateWorkflowsCommand);
84
+ .command('update')
85
+ .alias('update-workflows')
86
+ .description('Refresh workflows and all climaybe-managed project files')
87
+ .action(updateCommand);
87
88
 
88
89
  cmd
89
90
  .command('ensure-branches')
@@ -66,43 +66,20 @@ const VSCODE_TASKS_CONTENT = `{
66
66
  "version": "2.0.0",
67
67
  "tasks": [
68
68
  {
69
- "label": "Shopify",
69
+ "label": "Climaybe Serve",
70
70
  "type": "shell",
71
- "command": "climaybe serve:shopify",
71
+ "command": "climaybe serve",
72
72
  "isBackground": true,
73
73
  "presentation": {
74
74
  "echo": true,
75
75
  "reveal": "always",
76
76
  "focus": true,
77
- "panel": "new",
77
+ "panel": "shared",
78
78
  "group": "develop",
79
79
  "showReuseMessage": false,
80
80
  "clear": true
81
81
  },
82
82
  "problemMatcher": []
83
- },
84
- {
85
- "label": "Tailwind",
86
- "type": "shell",
87
- "command": "climaybe serve:assets",
88
- "isBackground": true,
89
- "presentation": {
90
- "echo": true,
91
- "reveal": "always",
92
- "focus": false,
93
- "panel": "new",
94
- "group": "develop",
95
- "showReuseMessage": false,
96
- "clear": true
97
- },
98
- "problemMatcher": []
99
- },
100
- {
101
- "label": "Run Both Consoles",
102
- "dependsOn": ["Shopify", "Tailwind"],
103
- "runOptions": {
104
- "runOn": "folderOpen"
105
- }
106
83
  }
107
84
  ]
108
85
  }
@@ -111,6 +88,8 @@ const VSCODE_TASKS_CONTENT = `{
111
88
  const GITIGNORE_BLOCK = `# climaybe: theme dev kit (managed)
112
89
  .vscode
113
90
  node_modules/
91
+ .DS_Store
92
+ **/.DS_Store
114
93
  assets/style.css
115
94
  assets/index.js
116
95
  .shopify
@@ -57,7 +57,9 @@ export function resolveInstallScope({ packageDir, cwd = process.cwd() } = {}) {
57
57
  return 'global';
58
58
  }
59
59
 
60
- function getLocalInstallFlag({ packageName, cwd = process.cwd() } = {}) {
60
+ export function getLocalInstallFlag({ packageName, cwd = process.cwd() } = {}) {
61
+ // Always keep climaybe in runtime dependencies for theme repos.
62
+ if (packageName === 'climaybe') return '--save';
61
63
  try {
62
64
  const pkgPath = join(cwd, 'package.json');
63
65
  if (!existsSync(pkgPath)) return '--save-dev';
@@ -88,6 +90,7 @@ export async function maybeOfferCliUpdate({
88
90
  timeoutMs = DEFAULT_TIMEOUT_MS,
89
91
  } = {}) {
90
92
  if (!packageName || !currentVersion || !canPromptForUpdate()) return;
93
+ const invocationCwd = process.cwd();
91
94
 
92
95
  const latestVersion = await fetchLatestVersion(packageName, timeoutMs);
93
96
  if (!latestVersion || !isVersionGreater(latestVersion, currentVersion)) return;
@@ -104,7 +107,8 @@ export async function maybeOfferCliUpdate({
104
107
  try {
105
108
  const updatedScope = runUpdate(packageName, { packageDir, cwd: process.cwd() });
106
109
  console.log(pc.green(`Updated ${packageName} (${updatedScope}) to latest. Restarting command...`));
107
- process.chdir(packageDir || process.cwd());
110
+ // Continue in the repo where the user invoked the command.
111
+ process.chdir(invocationCwd);
108
112
  } catch (err) {
109
113
  console.log(pc.red('Update failed. Continuing with current version.'));
110
114
  if (err?.message) console.log(pc.dim(err.message));