Skip to content

Commit

Permalink
chore(deps): update dependency prettier to v3.2.5 (#4416)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency prettier to v3.2.5

* chore: reformat

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Long Ho <holevietlong@gmail.com>
  • Loading branch information
renovate[bot] and longlho committed May 18, 2024
1 parent 961a2bb commit adcb8db
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 48 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/icu-messageformat-parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,8 @@ export class Parser {
argType === 'number'
? TYPE.number
: argType === 'date'
? TYPE.date
: TYPE.time,
? TYPE.date
: TYPE.time,
value,
location,
style: styleAndLocation?.style ?? null,
Expand Down
4 changes: 2 additions & 2 deletions packages/intl-datetimeformat/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ defineProperty(DateTimeFormat.prototype, 'resolvedOptions', {
value === 'h11' || value === 'h12'
? true
: value === 'h23' || value === 'h24'
? false
: undefined
? false
: undefined
if (hour12 !== undefined) {
ro.hour12 = hour12
}
Expand Down
12 changes: 6 additions & 6 deletions packages/intl-messageformat/src/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ export function formatToParts<T>(
typeof el.style === 'string'
? formats.date[el.style]
: isDateTimeSkeleton(el.style)
? el.style.parsedOptions
: undefined
? el.style.parsedOptions
: undefined
result.push({
type: PART_TYPE.literal,
value: formatters
Expand All @@ -192,8 +192,8 @@ export function formatToParts<T>(
typeof el.style === 'string'
? formats.time[el.style]
: isDateTimeSkeleton(el.style)
? el.style.parsedOptions
: formats.time.medium
? el.style.parsedOptions
: formats.time.medium
result.push({
type: PART_TYPE.literal,
value: formatters
Expand All @@ -207,8 +207,8 @@ export function formatToParts<T>(
typeof el.style === 'string'
? formats.number[el.style]
: isNumberSkeleton(el.style)
? el.style.parsedOptions
: undefined
? el.style.parsedOptions
: undefined

if (style && (style as ExtendedNumberFormatOptions).scale) {
value =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ const parseUCDTextFile = (filePath: string) => {

const rangeResult = rawCodes.match(UCD_CODE_RANGE_REGEX)
if (rangeResult) {
result[
propertyValueName
] += `\\u{${rangeResult[1]}}-\\u{${rangeResult[2]}}`
result[propertyValueName] +=
`\\u{${rangeResult[1]}}-\\u{${rangeResult[2]}}`
} else {
result[propertyValueName] += `\\u{${rawCodes}}`
}
Expand Down
20 changes: 10 additions & 10 deletions packages/swc-plugin/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ function primitiveToTSNode(
return typeof v === 'string'
? createStringLiteral(v, span)
: typeof v === 'number'
? createNumericLiteral(v, span)
: typeof v === 'boolean'
? createBooleanLiteral(v, span)
: undefined
? createNumericLiteral(v, span)
: typeof v === 'boolean'
? createBooleanLiteral(v, span)
: undefined
}

function isValidIdentifier(k: string): boolean {
Expand Down Expand Up @@ -330,8 +330,8 @@ function extractMessageDescriptor(
? prop.key
: undefined
: prop.type === 'JSXAttribute' && prop.name.type === 'Identifier'
? prop.name
: undefined
? prop.name
: undefined
if (!name) {
return
}
Expand All @@ -349,10 +349,10 @@ function extractMessageDescriptor(
prop.value.type === 'BinaryExpression')
? prop.value
: prop.type === 'JSXAttribute' &&
(prop.value?.type === 'StringLiteral' ||
prop.value?.type === 'JSXExpressionContainer')
? prop.value
: undefined
(prop.value?.type === 'StringLiteral' ||
prop.value?.type === 'JSXExpressionContainer')
? prop.value
: undefined

if (name && name.type === 'Identifier' && value) {
// {id: 'id'}
Expand Down
28 changes: 14 additions & 14 deletions packages/ts-transformer/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ function primitiveToTSNode(
return typeof v === 'string'
? factory.createStringLiteral(v)
: typeof v === 'number'
? factory.createNumericLiteral(v + '')
: typeof v === 'boolean'
? v
? factory.createTrue()
: factory.createFalse()
: undefined
? factory.createNumericLiteral(v + '')
: typeof v === 'boolean'
? v
? factory.createTrue()
: factory.createFalse()
: undefined
}

function isValidIdentifier(k: string): boolean {
Expand Down Expand Up @@ -737,14 +737,14 @@ function getVisitor(
const newNode = ts.isCallExpression(node)
? extractMessagesFromCallExpression(ts, ctx.factory, node, opts, sf)
: ts.isJsxOpeningElement(node) || ts.isJsxSelfClosingElement(node)
? extractMessageFromJsxComponent(
ts,
ctx.factory,
node as typescript.JsxOpeningElement,
opts,
sf
)
: node
? extractMessageFromJsxComponent(
ts,
ctx.factory,
node as typescript.JsxOpeningElement,
opts,
sf
)
: node
return ts.visitEachChild(newNode as typescript.Node, visitor, ctx)
}
return visitor
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tools/check-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ function main(args: Args) {
const externalDeps = Array.isArray(externalDep)
? externalDep
: externalDep
? [externalDep]
: []
? [externalDep]
: []
const internalDeps = Array.isArray(internalDep)
? internalDep
: internalDep
? [internalDep]
: []
? [internalDep]
: []
const packageJsonContent = readJSONSync(packageJson)
const rootPackageJsonContent = readJSONSync(rootPackageJson)
const {devDependencies: rootDependencies} = rootPackageJsonContent
Expand Down

0 comments on commit adcb8db

Please sign in to comment.