-
Notifications
You must be signed in to change notification settings - Fork 401
chore(deps): bump vulnerable deps #3461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
52e64a5
398223e
a6c4f57
90a3189
95f4e7f
8c3e414
1d4134a
cde6977
e22e32a
8536ab6
ee88b03
bf5c1ce
35059cf
da63bd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@shopify/mini-oxygen': patch | ||
| --- | ||
|
|
||
| Updated `undici` to `7.21.0` and `body-parser` to `1.20.4` to resolve known vulnerabilities. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@shopify/cli-hydrogen': patch | ||
| --- | ||
|
|
||
| Updated `prettier` from v2 to v3. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@shopify/hydrogen': patch | ||
| '@shopify/hydrogen-react': patch | ||
| --- | ||
|
|
||
| Updated transitive dependencies (`form-data`, `vite`) to resolve known vulnerabilities. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,9 +13,9 @@ | |
| "inquirer": "^12.4.2", | ||
| "istextorbinary": "9.5.0", | ||
| "ts-node": "^10.9.2", | ||
| "yaml": "^2.4.2", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing peer dep, npm hoisted from ✨somewhere✨ |
||
| "yargs": "^17.7.2", | ||
| "zod": "^3.24.2", | ||
| "zod-to-json-schema": "^3.24.5" | ||
| "zod": "^4.0.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/inquirer": "^9.0.9", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import {CommandModule} from 'yargs'; | ||
| import {zodToJsonSchema} from 'zod-to-json-schema'; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as of zod 4 we no longer need to use an external library |
||
| import {z} from 'zod'; | ||
| import fs from 'fs'; | ||
| import {COOKBOOK_PATH} from '../lib/constants'; | ||
| import path from 'path'; | ||
|
|
@@ -15,7 +15,7 @@ export const schema: CommandModule<{}, SchemaArgs> = { | |
| }; | ||
|
|
||
| async function handler(_: SchemaArgs) { | ||
| const jsonSchema = zodToJsonSchema(RecipeSchema); | ||
| const jsonSchema = z.toJSONSchema(RecipeSchema); | ||
| console.log(JSON.stringify(jsonSchema, null, 2)); | ||
|
|
||
| fs.writeFileSync( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ describe('formatValidationError', () => { | |
| it('should format error with line number and location', () => { | ||
| const error = { | ||
| validator: 'RecipeSchema', | ||
| message: 'Expected string, received number', | ||
| message: 'Invalid input: expected string, received number', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. error message changed in zod 4 |
||
| location: 'steps.0.step', | ||
| lineNumber: 52, | ||
| }; | ||
|
|
@@ -37,7 +37,7 @@ describe('formatValidationError', () => { | |
|
|
||
| expect(formatted).toContain('recipe.yaml:52'); | ||
| expect(formatted).toContain('steps.0.step'); | ||
| expect(formatted).toContain('RecipeSchema: Expected string, received number'); | ||
| expect(formatted).toContain('RecipeSchema: Invalid input: expected string, received number'); | ||
| }); | ||
|
|
||
| it('should format error without line number', () => { | ||
|
|
@@ -740,8 +740,8 @@ commit: abc123 | |
|
|
||
| const errorOutput = consoleErrorSpy.mock.calls.map(call => call[0]).join('\n'); | ||
|
|
||
| expect(errorOutput).toContain('Expected string, received number (actual value: 1)'); | ||
| expect(errorOutput).toContain('Expected string, received number (actual value: 2)'); | ||
| expect(errorOutput).toContain('Invalid input: expected string, received number (actual value: 1)'); | ||
| expect(errorOutput).toContain('Invalid input: expected string, received number (actual value: 2)'); | ||
| }); | ||
|
|
||
| it('should collect and format all validation errors with line numbers', () => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,8 +123,9 @@ export function handleZodErrorFromLoadRecipe( | |
| recipeYamlPath: string, | ||
| ): void { | ||
| const errors: ValidationError[] = error.issues.map((issue) => { | ||
| const lineNumber = getYamlLineNumber(recipeYamlPath, issue.path); | ||
| const actualValue = getYamlValue(recipeYamlPath, issue.path); | ||
| const issuePath = issue.path as (string | number)[]; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. zod 4 fixed this type to PropertyKey (it was always PropertyKey in runtime, but it was typed as string | number) |
||
| const lineNumber = getYamlLineNumber(recipeYamlPath, issuePath); | ||
| const actualValue = getYamlValue(recipeYamlPath, issuePath); | ||
|
|
||
| let message = issue.message; | ||
| if (actualValue !== null) { | ||
|
|
@@ -366,8 +367,9 @@ export function validateRecipe(params: { | |
| } catch (error) { | ||
| if (error instanceof ZodError) { | ||
| error.issues.forEach((issue) => { | ||
| const lineNumber = getYamlLineNumber(recipeYamlPath, issue.path); | ||
| const actualValue = getYamlValue(recipeYamlPath, issue.path); | ||
| const issuePath = issue.path as (string | number)[]; | ||
| const lineNumber = getYamlLineNumber(recipeYamlPath, issuePath); | ||
| const actualValue = getYamlValue(recipeYamlPath, issuePath); | ||
|
|
||
| let message = issue.message; | ||
| if (actualValue !== null) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this harmless? i had to update a test snapshot because it formats thigns slightlyyy differently
i know
cli-hydrogenformats files after it adds them to the projects – i wonder if it wouldn’t be best to have this as a peer dep instead in the future and avoid bundling it with the cli binarythe reason why is that the user may be using another version of prettier, or no prettier at all, in which case we simply should skip formatting instead of forcing down our version of it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is safe to merge, but we can open an issue to refactor.