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

fix($output-style): Removes accidental trailing curly-brace #45

Merged
merged 2 commits into from
Dec 21, 2021
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"danger-plugin",
"yarn"
],
"version": "1.3.3",
"version": "1.4.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ We try to keep as much discussion as possible in GitHub issues, but also have a


</details>
}



<details>
Expand Down Expand Up @@ -485,6 +485,6 @@ We try to keep as much discussion as possible in GitHub issues, but also have a


</details>
}

"
`;
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const checkForRelease = packageDiff => {
}
}

interface DepDuplicationCache {
export interface DepDuplicationCache {
[depName: string]: {
packageJSONPaths: string[]
npmData: PartiallyRenderedNPMMetadata
Expand Down Expand Up @@ -133,7 +133,7 @@ const forwardSlashRegex = /(\/+)/g
const wrappableURLForTextDisplay = (url: string) => (url || "").replace(forwardSlashRegex, `$1<wbr/>`)

/** Represents a label / value, aka 2 cells */
interface TableDeetNew {
export interface TableDeetNew {
/** Label */
name: string
/** Value */
Expand All @@ -142,18 +142,18 @@ interface TableDeetNew {
colspan?: number
}
/** Represents arbitrary cell contents */
interface TableDeetFormatted {
export interface TableDeetFormatted {
content: string
colspan?: number
}
/** Represents arbitrary cell that will be dynamically replaced on final render */
interface TableDeetPlaceholder {
export interface TableDeetPlaceholder {
placeholderKey: "used-in-packages"
colspan?: number
}
interface TableRowBreak { break: "row-break" }
export interface TableRowBreak { break: "row-break" }

type TableDeet = TableRowBreak | TableDeetNew | TableDeetFormatted | TableDeetPlaceholder
export type TableDeet = TableRowBreak | TableDeetNew | TableDeetFormatted | TableDeetPlaceholder
const isTableDeetPlaceholder = (deet: TableDeet): deet is TableDeetPlaceholder => {
return "placeholderKey" in deet
}
Expand All @@ -164,7 +164,7 @@ const isTableRowBreak = (deet: TableDeet): deet is TableRowBreak => {
return "break" in deet
}

interface PartiallyRenderedNPMMetadata {
export interface PartiallyRenderedNPMMetadata {
details: TableDeet[]
readme: string
}
Expand Down Expand Up @@ -362,7 +362,7 @@ export function _renderNPMTable({
return `<table>
${rowContent.map(row => `<tr>${row}</tr>`).join("\n")}
</table>
${readme}}
${readme}
`
}

Expand Down