@wyxos/zephyr 0.4.4 → 0.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/zephyr",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -52,7 +52,16 @@ export async function resolveLocalDeploymentCheckSupport({
52
52
  isLaravel,
53
53
  runCommandCapture
54
54
  } = {}) {
55
- const lintCommand = await preflight.resolveSupportedLintCommand(rootDir, {commandExists})
55
+ let lintCommand = null
56
+
57
+ try {
58
+ lintCommand = await preflight.resolveSupportedLintCommand(rootDir, {commandExists})
59
+ } catch (error) {
60
+ if (error?.code !== 'ZEPHYR_LINT_COMMAND_NOT_FOUND') {
61
+ throw error
62
+ }
63
+ }
64
+
56
65
  const testCommand = isLaravel
57
66
  ? await resolveSupportedLaravelTestCommand(rootDir, {runCommandCapture})
58
67
  : null
@@ -115,14 +124,20 @@ export async function runLocalDeploymentChecks({
115
124
  }
116
125
  }
117
126
 
118
- const lintRan = await preflight.runLinting(rootDir, {
119
- runCommand,
120
- logProcessing,
121
- logSuccess,
122
- logWarning,
123
- commandExists,
124
- lintCommand: support.lintCommand
125
- })
127
+ if (support.lintCommand === null) {
128
+ logWarning?.('No supported lint command was found. Skipping linting checks.')
129
+ }
130
+
131
+ const lintRan = support.lintCommand === null
132
+ ? false
133
+ : await preflight.runLinting(rootDir, {
134
+ runCommand,
135
+ logProcessing,
136
+ logSuccess,
137
+ logWarning,
138
+ commandExists,
139
+ lintCommand: support.lintCommand
140
+ })
126
141
 
127
142
  if (lintRan) {
128
143
  const hasChanges = await hasUncommittedChanges(rootDir, {runCommandCapture})
@@ -83,10 +83,12 @@ export async function resolveSupportedLintCommand(rootDir, {commandExists} = {})
83
83
  }
84
84
  }
85
85
 
86
- throw new Error(
86
+ const error = new Error(
87
87
  'Release cannot run because no supported lint command was found.\n' +
88
88
  'Zephyr requires either `npm run lint` or Laravel Pint (`vendor/bin/pint`) before deployment.'
89
89
  )
90
+ error.code = 'ZEPHYR_LINT_COMMAND_NOT_FOUND'
91
+ throw error
90
92
  }
91
93
 
92
94
  export async function runLinting(rootDir, {