Skip to content

Commit

Permalink
Merge pull request #5169 from Shopify/shauns/dependabot-dev-post-373
Browse files Browse the repository at this point in the history
Dev dependency update post 3.73
  • Loading branch information
shauns authored Jan 8, 2025
2 parents 3a87534 + 0562adf commit 3a658c7
Show file tree
Hide file tree
Showing 21 changed files with 554 additions and 426 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@octokit/rest": "20.1.1",
"@shopify/eslint-plugin-cli": "file:packages/eslint-plugin-cli",
"@shopify/generate-docs": "0.15.6",
"@types/node": "18.19.3",
"@types/node": "18.19.70",
"@types/tmp": "^0.2.3",
"@typescript-eslint/parser": "7.18.0",
"ansi-colors": "^4.1.3",
Expand Down Expand Up @@ -77,7 +77,7 @@
"rimraf": "^3.0.2",
"tmp": "^0.2.1",
"ts-node": "^10.9.1",
"typescript": "5.2.2",
"typescript": "5.7.2",
"vitest": "^1.6.0"
},
"workspaces": {
Expand All @@ -97,7 +97,7 @@
"version": "0.0.0",
"resolutions": {
"@types/react": "17.0.2",
"vite": "5.3.1",
"vite": "5.4.11",
"@oclif/core": "3.26.5",
"whatwg-url": "14.0.0",
"supports-hyperlinks": "3.1.0",
Expand Down
5 changes: 1 addition & 4 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,11 @@
"@types/diff": "^5.0.3",
"@types/express": "^4.17.17",
"@types/http-proxy": "^1.17.11",
"@types/node": "18.19.3",
"@types/proper-lockfile": "4.1.4",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@types/ws": "^8.5.13",
"@vitest/coverage-istanbul": "^1.6.0",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6"
"@vitest/coverage-istanbul": "^1.6.0"
},
"engines": {
"node": "^18.20.0 || >=20.10.0"
Expand Down
7 changes: 4 additions & 3 deletions packages/app/src/cli/models/app/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ async function getAllLinkedConfigClientIds(
): Promise<{[key: string]: string}> {
const candidates = await glob(joinPath(appDirectory, appConfigurationFileNameGlob))

const entries = (
const entries: [string, string][] = (
await Promise.all(
candidates.map(async (candidateFile) => {
const configName = basename(candidateFile)
Expand All @@ -1059,7 +1059,7 @@ async function getAllLinkedConfigClientIds(
}
}),
)
).filter((entry) => entry !== undefined) as [string, string][]
).filter((entry) => entry !== undefined)
return Object.fromEntries(entries)
}

Expand Down Expand Up @@ -1155,7 +1155,8 @@ async function logMetadataForLoadedAppUsingRawValues(
if (extensionsBreakdownMapping[extension.type] === undefined) {
extensionsBreakdownMapping[extension.type] = 1
} else {
extensionsBreakdownMapping[extension.type]++
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
extensionsBreakdownMapping[extension.type]!++
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function reduceWebhooks(
const existingSubscription = findSubscription(accumulator, subscription)
if (existingSubscription) {
if (property && subscription?.[property]?.length) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-non-null-assertion
existingSubscription[property]?.push(...subscription[property]!)
} else {
if (subscription.topics) {
Expand Down
8 changes: 3 additions & 5 deletions packages/cli-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,17 @@
},
"devDependencies": {
"@types/commondir": "^1.0.0",
"@types/diff": "^5.0.3",
"@types/diff": "^5.2.3",
"@types/fs-extra": "9.0.13",
"@types/gradient-string": "^1.1.2",
"@types/lodash": "4.14.195",
"@types/node": "18.19.3",
"@types/lodash": "4.17.14",
"@types/react": "18.2.0",
"@types/semver": "^7.5.2",
"@types/which": "3.0.4",
"@vitest/coverage-istanbul": "^1.6.0",
"node-stream-zip": "^1.15.0",
"ts-morph": "^17.0.1",
"typedoc": "^0.25.7",
"typescript": "5.2.2"
"typedoc": "^0.27.6"
},
"engines": {
"node": "^18.20.0 || >=20.10.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
export function replaceInvalidCharacters(identifier: string) {
const findAllMatches = 'g'
const enablesUnicodeSupport = 'u'
return identifier.replace(
new RegExp(/[^\p{Letter}\p{Number}\p{Mark}-]/, `${findAllMatches}${enablesUnicodeSupport}`),
'-',
)
// gu: global, and enable unicode support
const regex = /[^\p{Letter}\p{Number}\p{Mark}-]/gu
return identifier.replace(regex, '-')
}
2 changes: 1 addition & 1 deletion packages/cli-kit/src/private/node/ui/components/Tasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Task<TContext = unknown> {
skip?: (ctx: TContext) => boolean
}

export interface TasksProps<TContext> {
interface TasksProps<TContext> {
tasks: Task<TContext>[]
silent?: boolean
onComplete?: (ctx: TContext) => void
Expand Down
56 changes: 21 additions & 35 deletions packages/cli-kit/src/private/node/ui/components/TokenizedText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,17 @@ import {Subdued} from './Subdued.js'
import {Box, Text} from 'ink'
import React, {FunctionComponent} from 'react'

export interface CommandToken {
command: string
}

export interface LinkToken {
link: {
label?: string
url: string
}
}

export interface CharToken {
char: string
}

export interface UserInputToken {
userInput: string
}

export interface SubduedToken {
subdued: string
}

export interface FilePathToken {
filePath: string
}

export interface ListToken {
list: {
title?: TokenItem<InlineToken>
Expand All @@ -47,31 +31,33 @@ export interface BoldToken {
bold: string
}

export interface InfoToken {
info: string
}

export interface WarnToken {
warn: string
}

export interface ErrorToken {
error: string
}

export type Token =
| string
| CommandToken
| {
command: string
}
| LinkToken
| CharToken
| {
char: string
}
| UserInputToken
| SubduedToken
| FilePathToken
| {
subdued: string
}
| {
filePath: string
}
| ListToken
| BoldToken
| InfoToken
| WarnToken
| ErrorToken
| {
info: string
}
| {
warn: string
}
| {
error: string
}

export type InlineToken = Exclude<Token, ListToken>
export type TokenItem<T extends Token = Token> = T | T[]
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-kit/src/public/node/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function createRuntimeMetadataContainer<

// If this is the topmost timer, the stack will be empty.
if (durationStack.length > 0) {
durationStack[durationStack.length - 1] += wallClockDuration
durationStack[durationStack.length - 1] = (durationStack[durationStack.length - 1] ?? 0) + wallClockDuration
}

// Log it -- we include it in the metadata, but also log via the standard performance API. The TS types for this library are not quite right, so we have to cast to `any` here.
Expand Down
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"@shopify/plugin-did-you-mean": "3.73.0",
"@shopify/theme": "3.73.0",
"@shopify/cli-hydrogen": "9.0.3",
"@types/node": "18.19.3",
"@typescript-eslint/eslint-plugin": "7.13.1",
"@vitest/coverage-istanbul": "^1.6.0",
"esbuild-plugin-copy": "^2.1.1",
Expand Down
1 change: 0 additions & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"devDependencies": {
"@shopify/cli-kit": "3.73.0",
"@shopify/app": "3.73.0",
"@types/node": "18.19.3",
"esbuild-plugin-copy": "^2.1.1",
"@vitest/coverage-istanbul": "^1.6.0"
},
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"debug": "4.4.0"
},
"devDependencies": {
"typescript": "5.2.2",
"prettier": "2.8.8"
},
"peerDependencies": {
Expand Down
8 changes: 1 addition & 7 deletions packages/features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,9 @@
"@cucumber/messages": "22.0.0",
"@cucumber/pretty-formatter": "1.0.0",
"@types/fs-extra": "^9.0.13",
"@types/node": "18.19.3",
"@types/rimraf": "^3.0.2",
"ansi-colors": "^4.1.3",
"execa": "^7.2.0",
"fs-extra": "^9.1.0",
"pathe": "1.1.1",
"rimraf": "^3.0.2",
"tempy": "^1.0.1",
"fast-glob": "3.3.3"
"tempy": "^1.0.1"
},
"engines": {
"node": "^18.20.0 || >=20.10.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-did-you-mean/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ function sanitizeCmd(cmd: string): string {
function relativeScore(commandBigrams: string[], userCommandBigrams: string[]): number {
const map: {[key: string]: number} = {}
commandBigrams.forEach((elem) => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
map[elem] = map[elem] ? map[elem]! + 1 : 1
})
const result: string[] = []
for (const key of userCommandBigrams) {
if (key in map && map[key]! > 0) {
result.push(key)
map[key]--
map[key] = map[key]! - 1
}
}
return result.length
Expand Down
1 change: 0 additions & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"yaml": "2.7.0"
},
"devDependencies": {
"@types/node": "18.19.3",
"@vitest/coverage-istanbul": "^1.6.0",
"node-stream-zip": "^1.15.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/theme/src/cli/services/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export function sortOffenses(offenses: Offense[]): OffenseMap {
acc[filePath] = []
}

// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
acc[filePath]!.push(offense)
return acc
}, {})
Expand Down
6 changes: 2 additions & 4 deletions packages/ui-extensions-dev-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@
"devDependencies": {
"@shopify/react-testing": "^3.0.0",
"@shopify/ui-extensions-test-utils": "3.26.0",
"@types/node": "18.19.3",
"@types/qrcode.react": "^1.0.2",
"@types/react": "16.14.0",
"@types/react-dom": "^16.9.11",
"@vitejs/plugin-react-refresh": "^1.3.6",
"jsdom": "^20.0.3",
"sass": "^1.64.2",
"typescript": "5.2.2",
"vite": "^5.3.1"
"sass": "^1.83.1",
"vite": "5.4.11"
}
}
4 changes: 1 addition & 3 deletions packages/ui-extensions-server-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@
"devDependencies": {
"@shopify/react-testing": "^3.0.0",
"@shopify/ui-extensions-test-utils": "3.26.0",
"@types/node": "18.19.3",
"@types/react": "17.0.2",
"@vitejs/plugin-react-refresh": "^1.3.6",
"jest-websocket-mock": "^2.4.0",
"jsdom": "^20.0.3",
"react": "^17.0.2",
"typescript": "5.2.2",
"vi-fetch": "^0.8.0",
"vite": "^5.3.1"
"vite": "5.4.11"
},
"peerDependencies": {
"react": "^17.0.2"
Expand Down
4 changes: 1 addition & 3 deletions packages/ui-extensions-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@
},
"devDependencies": {
"@shopify/react-testing": "^3.0.0",
"@types/node": "18.19.3",
"@types/react": "16.14.0",
"@types/react-dom": "^16.9.11",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"typescript": "5.2.2"
"react-dom": "^17.0.2"
},
"peerDependencies": {
"react": "^17.0.2"
Expand Down
Loading

0 comments on commit 3a658c7

Please sign in to comment.