Skip to content
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

chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 #9357

Merged
merged 3 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 5 additions & 4 deletions .github/actions/close-bot/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function allChangelogLinesAreVersionBump(changelogLines) {
changelogLines.length > 0 &&
changelogLines.length ===
changelogLines.filter(line =>
line.includes('Version bump only for package')
line.includes('Version bump only for package'),
).length
)
}
Expand All @@ -52,14 +52,15 @@ function isPointlessVersionBump(body) {
.filter(line => !line.startsWith('<h'))
.filter(line => !line.startsWith('<p>All notable changes'))
.filter(
line => !line.startsWith('See <a href="https://conventionalcommits.org">')
line =>
!line.startsWith('See <a href="https://conventionalcommits.org">'),
)
.filter(line => !line.startsWith('<!--'))
.filter(
line =>
!line.startsWith(
'<p><a href="https://www.gatsbyjs.com/docs/reference/release-notes/'
)
'<p><a href="https://www.gatsbyjs.com/docs/reference/release-notes/',
),
)
return allChangelogLinesAreVersionBump(changelogLines)
}
Expand Down
2 changes: 1 addition & 1 deletion badge-maker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ badge.loadFont('/path/to/Verdana.ttf', err => {
{ text: ['build', 'passed'], colorscheme: 'green', template: 'flat' },
(svg, err) => {
// svg is a string containing your badge
}
},
)
})
```
8 changes: 4 additions & 4 deletions badge-maker/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ expectError(
makeBadge({
message: 'passed',
style: 'invalid style',
})
}),
)

expectType<string>(
makeBadge({
message: 'passed',
})
}),
)
expectType<string>(
makeBadge({
label: 'build',
message: 'passed',
})
}),
)
expectType<string>(
makeBadge({
Expand All @@ -28,7 +28,7 @@ expectType<string>(
labelColor: 'green',
color: 'red',
style: 'flat',
})
}),
)

const error = new ValidationError()
Expand Down
12 changes: 6 additions & 6 deletions badge-maker/lib/badge-renderers.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function getLogoElement({ logo, horizPadding, badgeHeight, logoWidth }) {

function renderBadge(
{ links, leftWidth, rightWidth, height, accessibleText },
content
content,
) {
const width = leftWidth + rightWidth
const leftLink = links[0]
Expand Down Expand Up @@ -397,7 +397,7 @@ class Plastic extends Badge {
accessibleText: this.accessibleText,
height: this.constructor.height,
},
[gradient, clipPath, backgroundGroup, this.foregroundGroupElement]
[gradient, clipPath, backgroundGroup, this.foregroundGroupElement],
)
}
}
Expand Down Expand Up @@ -446,7 +446,7 @@ class Flat extends Badge {
accessibleText: this.accessibleText,
height: this.constructor.height,
},
[gradient, clipPath, backgroundGroup, this.foregroundGroupElement]
[gradient, clipPath, backgroundGroup, this.foregroundGroupElement],
)
}
}
Expand Down Expand Up @@ -478,7 +478,7 @@ class FlatSquare extends Badge {
accessibleText: this.accessibleText,
height: this.constructor.height,
},
[backgroundGroup, this.foregroundGroupElement]
[backgroundGroup, this.foregroundGroupElement],
)
}
}
Expand Down Expand Up @@ -748,7 +748,7 @@ function social({
accessibleText,
height: externalHeight,
},
[style, gradients, backgroundGroup, logoElement, foregroundGroup]
[style, gradients, backgroundGroup, logoElement, foregroundGroup],
)
}

Expand Down Expand Up @@ -978,7 +978,7 @@ function forTheBadge({
accessibleText: createAccessibleText({ label, message }),
height: BADGE_HEIGHT,
},
[backgroundGroup, foregroundGroup]
[backgroundGroup, foregroundGroup],
)
}

Expand Down
2 changes: 1 addition & 1 deletion badge-maker/lib/color.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test(toSvgColor, () => {
given('papayawhip').expect('papayawhip')
given('purple').expect('purple')
forCases([given(''), given(undefined), given('not-a-color')]).expect(
undefined
undefined,
)
given('lightgray').expect('#9f9f9f')
given('informational').expect('#007ec6')
Expand Down
4 changes: 2 additions & 2 deletions badge-maker/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function _validate(format) {
]
if ('style' in format && !styleValues.includes(format.style)) {
throw new ValidationError(
`Field \`style\` must be one of (${styleValues.toString()})`
`Field \`style\` must be one of (${styleValues.toString()})`,
)
}
}
Expand All @@ -46,7 +46,7 @@ function _clean(format) {
cleaned[key] = format[key]
} else {
throw new ValidationError(
`Unexpected field '${key}'. Allowed values are (${expectedKeys.toString()})`
`Unexpected field '${key}'. Allowed values are (${expectedKeys.toString()})`,
)
}
})
Expand Down
28 changes: 14 additions & 14 deletions badge-maker/lib/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ describe('makeBadge function', function () {
makeBadge({
label: 'build',
message: 'passed',
})
}),
).to.satisfy(isSvg)
expect(
makeBadge({
message: 'passed',
})
}),
).to.satisfy(isSvg)
expect(
makeBadge({
label: 'build',
message: 'passed',
color: 'green',
style: 'flat',
})
}),
).to.satisfy(isSvg)
})

Expand All @@ -32,44 +32,44 @@ describe('makeBadge function', function () {
console.log(x)
expect(() => makeBadge(x)).to.throw(
ValidationError,
'makeBadge takes an argument of type object'
'makeBadge takes an argument of type object',
)
})
expect(() => makeBadge({})).to.throw(
ValidationError,
'Field `message` is required'
'Field `message` is required',
)
expect(() => makeBadge({ label: 'build' })).to.throw(
ValidationError,
'Field `message` is required'
'Field `message` is required',
)
expect(() =>
makeBadge({ label: 'build', message: 'passed', labelColor: 7 })
makeBadge({ label: 'build', message: 'passed', labelColor: 7 }),
).to.throw(ValidationError, 'Field `labelColor` must be of type string')
expect(() =>
makeBadge({ label: 'build', message: 'passed', format: 'png' })
makeBadge({ label: 'build', message: 'passed', format: 'png' }),
).to.throw(ValidationError, "Unexpected field 'format'")
expect(() =>
makeBadge({ label: 'build', message: 'passed', template: 'flat' })
makeBadge({ label: 'build', message: 'passed', template: 'flat' }),
).to.throw(ValidationError, "Unexpected field 'template'")
expect(() =>
makeBadge({ label: 'build', message: 'passed', foo: 'bar' })
makeBadge({ label: 'build', message: 'passed', foo: 'bar' }),
).to.throw(ValidationError, "Unexpected field 'foo'")
expect(() =>
makeBadge({
label: 'build',
message: 'passed',
style: 'something else',
})
}),
).to.throw(
ValidationError,
'Field `style` must be one of (plastic,flat,flat-square,for-the-badge,social)'
'Field `style` must be one of (plastic,flat,flat-square,for-the-badge,social)',
)
expect(() =>
makeBadge({ label: 'build', message: 'passed', style: 'popout' })
makeBadge({ label: 'build', message: 'passed', style: 'popout' }),
).to.throw(
ValidationError,
'Field `style` must be one of (plastic,flat,flat-square,for-the-badge,social)'
'Field `style` must be one of (plastic,flat,flat-square,for-the-badge,social)',
)
})
})
2 changes: 1 addition & 1 deletion badge-maker/lib/make-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ module.exports = function makeBadge({
logoPadding: logo && label.length ? 3 : 0,
color: toSvgColor(color),
labelColor: toSvgColor(labelColor),
})
}),
)
}
Loading
Loading