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: bump to prettier 3.0.3 #66

Merged
merged 1 commit into from
Oct 4, 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
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 @@ -50,7 +50,7 @@
"@types/tinycolor2": "^1.4.3",
"ajv-cli": "^5.0.0",
"import-sort-style-module": "^6.0.0",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"prettier-plugin-import-sort": "^0.0.7",
"tsx": "^3.13.0"
},
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion scripts/build/steps/addChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const addChains = async () => {
// only set relay and paraId if both exist on configChain
// TODO: Figure out parachains automatically
const hasRelay = Boolean(
configChain.relay?.id && sharedData.chainsConfig.some((chain) => chain.id === configChain.relay!.id)
configChain.relay?.id && sharedData.chainsConfig.some((chain) => chain.id === configChain.relay!.id),
)

const chain: Chain = {
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/steps/addEvmNetworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const addEvmNetworks = async () => {
// for those that reject, we want the chaindata CI requests to also reject
Origin: 'chrome-extension://abpofhpcakjhnpklgodncneklaobppdc',
},
}
},
)

// check response status
Expand All @@ -171,7 +171,7 @@ export const addEvmNetworks = async () => {
} catch (error) {
return null
}
}) ?? []
}) ?? [],
)

// set id
Expand Down
6 changes: 3 additions & 3 deletions scripts/build/steps/addThemeColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const addThemeColors = async () => {

if (typeof evmNetwork.logo === 'string') {
console.log(
`Extracting theme color from logo for evmNetwork ${index + 1} of ${evmNetworks.length} (${evmNetwork.name})`
`Extracting theme color from logo for evmNetwork ${index + 1} of ${evmNetworks.length} (${evmNetwork.name})`,
)
evmNetwork.themeColor =
(await extractDominantLogoColor('evmNetwork', evmNetwork.id, evmNetwork.logo)) ?? evmNetwork.themeColor
Expand Down Expand Up @@ -73,7 +73,7 @@ const extractDominantLogoColor = async (entityType: string, entityId: string, lo
.toBuffer((error, data, info) => {
if (error) return reject(error)
resolve([new Uint8ClampedArray(data.buffer), info])
})
}),
)

const colors = await extractColors(
Expand All @@ -85,7 +85,7 @@ const extractDominantLogoColor = async (entityType: string, entityId: string, lo
hueDistance: 0.083333333,
saturationDistance: 0.2,
lightnessDistance: 0.2,
}
},
)

const mostReadable =
Expand Down
6 changes: 3 additions & 3 deletions scripts/build/steps/fetchChainsExtras.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const attemptToFetchChainExtras = async (
chain: Chain,
rpcUrl: string,
attempt: number,
maxAttempts: number
maxAttempts: number,
): Promise<boolean> => {
try {
// fetch rpc data
Expand All @@ -70,7 +70,7 @@ const attemptToFetchChainExtras = async (
// // TODO: Get parachainId from storage
// ['state_getStorage', ['0x0d715f2646c8f85767b5d2764bb2782604a74d81251e398fd8a0a4d55023bb3f']],
],
RPC_REQUEST_TIMEOUT
RPC_REQUEST_TIMEOUT,
)

// deconstruct rpc data
Expand Down Expand Up @@ -98,7 +98,7 @@ const attemptToFetchChainExtras = async (
console.warn(
`Fetching extras for chain ${chain.id}: attempt ${attempt} of ${maxAttempts} failed: ${
(error as Error)?.message ?? error
} (${rpcUrl})`
} (${rpcUrl})`,
)
}

Expand Down
10 changes: 5 additions & 5 deletions scripts/build/steps/writeChaindataIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ${getFileList()
.join('\n')}
</pre>
</body>
</html>`
</html>`,
)
}

Expand All @@ -54,8 +54,8 @@ const writeChains = async () => {
specVersion,
})),
null,
2
)
2,
),
)

for (const chain of allChains) {
Expand Down Expand Up @@ -85,8 +85,8 @@ const writeEvmNetworks = async () => {
logo,
})),
null,
2
)
2,
),
)

for (const evmNetwork of allEvmNetworks) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const sleep = (ms: number) => new Promise<void>((resolve) => setTimeout(r
export const sendWithTimeout = async (
url: string,
requests: Array<[string, any?]>,
timeout: number = 10_000
timeout: number = 10_000,
): Promise<any[]> => {
const autoConnectMs = 0
const ws = new WsProvider(
Expand All @@ -69,7 +69,7 @@ export const sendWithTimeout = async (
},
// doesn't matter what this is as long as it's a bit larger than `timeout`
// if it's not set then `new WsProvider` will throw an uncatchable error after 60s
timeout * 99
timeout * 99,
)

return await (async () => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/fetch-external/steps/doSomeThings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export const doSomeThings = async () => {
fill-rule="evenodd"
/>
<path d="M46.949 55.005a6.003 6.003 0 1 1-12.006 0 6.003 6.003 0 0 1 12.006 0z" fill="#fd4848" />
</svg>`
</svg>`,
)
}
10 changes: 5 additions & 5 deletions scripts/import-from-multi-relay-chain-future.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ss58IdOverrides = {

const chaindata = JSON.parse(fs.readFileSync('chaindata.json'))
const ss58Registry = JSON.parse(
(await exec('curl -sL https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json')).stdout
(await exec('curl -sL https://raw.githubusercontent.com/paritytech/ss58-registry/main/ss58-registry.json')).stdout,
).registry

//
Expand All @@ -44,8 +44,8 @@ const ss58IdOverrides = {
fs.readFileSync(
isNaN(paraId)
? `../chaindata/${relayOldId}/manifest.json`
: `../chaindata/${relayOldId}/parathreads/${paraId}/manifest.json`
)
: `../chaindata/${relayOldId}/parathreads/${paraId}/manifest.json`,
),
)

if (oldChain.name === undefined) oldChain.name = null
Expand Down Expand Up @@ -90,7 +90,7 @@ const ss58IdOverrides = {
rpcs: oldChain.rpcs,
paraId,
relay: { id: relayId },
}
},
)
}

Expand Down Expand Up @@ -121,7 +121,7 @@ const ss58IdOverrides = {

if (JSON.stringify(chain.rpcs) !== JSON.stringify(oldChain.rpcs)) {
console.log(
`Updating chain rpcs for ${id} from ${JSON.stringify(chain.rpcs)} to ${JSON.stringify(oldChain.rpcs)}`
`Updating chain rpcs for ${id} from ${JSON.stringify(chain.rpcs)} to ${JSON.stringify(oldChain.rpcs)}`,
)
chain.rpcs = oldChain.rpcs
}
Expand Down
Loading