Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

chore: misc config cleanup #475

Merged
merged 3 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100
tab_width = 2
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
deno-version: v1.x
- name: Setup polkadot
uses: ./.github/actions/setup-polkadot
- run: deno task lint
- run: deno lint
- run: deno task codegen
- run: deno task star
- run: deno task test
6 changes: 3 additions & 3 deletions codegen/server/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export class LocalCapiCodegenServer extends CapiCodegenServer {
throw new Error("Could not detect version from url " + url)
}

async defaultVersion() {
return this.mainVersion
defaultVersion() {
return Promise.resolve(this.mainVersion)
}

deploymentUrlMemo = new PermanentMemo<string, string>()
async deploymentUrl(version: string) {
deploymentUrl(version: string) {
return this.deploymentUrlMemo.run(version, async () => {
const mod = await import(await this.moduleFileUrl(version, "/codegen/server/local.ts"))
const Server = mod.LocalCapiCodegenServer as typeof LocalCapiCodegenServer
Expand Down
4 changes: 2 additions & 2 deletions codegen/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const client = C.rpcClient(C.rpc.proxyProvider, ${JSON.stringify(chainUrl
)
}

async autocompleteSchema() {
autocompleteSchema() {
return this.json({
version: 2,
registries: [
Expand Down Expand Up @@ -403,7 +403,7 @@ export const client = C.rpcClient(C.rpc.proxyProvider, ${JSON.stringify(chainUrl
LATEST_CHAIN_VERSION_TTL,
this.abortController.signal,
)
async latestChainVersion(chainUrl: string) {
latestChainVersion(chainUrl: string) {
return this.latestChainVersionMemo.run(chainUrl, async () => {
const client = this.client(chainUrl)
const chainVersion = U.throwIfError(
Expand Down
11 changes: 3 additions & 8 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lock": false,
"lint": {
"files": {
"exclude": ["target", "codegen/_output"],
"exclude": ["target"],
"include": ["."]
},
"rules": {
Expand All @@ -22,8 +22,7 @@
"no-namespace",
"no-empty",
"no-extra-semi",
"ban-types",
"require-await"
"ban-types"
],
"tags": ["recommended"]
}
Expand All @@ -32,17 +31,13 @@
"run": "deno run -A",
"run:browser": "deno task run test_util/ctx.ts -- deno task run _tasks/run_browser.ts",
"debug": "deno task run --inspect-brk",
"download:frame_metadata": "deno task run _tasks/download_frame_metadata.ts",
"udd": "deno task star && deno task run https://deno.land/x/[email protected]/main.ts target/star.ts",
"dnt": "deno task run _tasks/dnt.ts",
"star": "deno task run _tasks/star.ts && deno cache --check target/star.ts",
"lint": "deno lint",
"codegen": "deno task run cache.ts examples/mod.ts",
"test": "deno task run test_util/ctx.ts -- deno test -A -L=info --ignore=target --parallel",
"test:update": "deno task test -- -- --update",
"mdbook:watch": "mdbook watch -o",
"bench": "deno bench -A",
"moderate": "deno task run https://deno.land/x/[email protected]/mod.ts && dprint fmt",
"polkagen": "deno task run codegen.ts -d=polkadot -o=target/polkagen --import=../../mod.ts"
"moderate": "deno task run https://deno.land/x/[email protected]/mod.ts && dprint fmt"
}
}
19 changes: 7 additions & 12 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,13 @@
"arrowFunction.useParentheses": "force",
"semiColons": "asi"
},
"includes": [
"**.{dockerfile,json,md,toml,ts}"
],
"excludes": [
"frame_metadata/raw_erc20_metadata.json",
"target"
],
"includes": ["**.{dockerfile,json,md,toml,ts,tsx}"],
"excludes": ["frame_metadata/raw_erc20_metadata.json", "target"],
"plugins": [
"https://plugins.dprint.dev/dockerfile-0.2.3.wasm",
"https://plugins.dprint.dev/json-0.15.3.wasm",
"https://plugins.dprint.dev/markdown-0.13.3.wasm",
"https://plugins.dprint.dev/typescript-0.69.4.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm"
"https://plugins.dprint.dev/dockerfile-0.3.0.wasm",
"https://plugins.dprint.dev/json-0.17.0.wasm",
"https://plugins.dprint.dev/markdown-0.15.1.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm",
"https://plugins.dprint.dev/typescript-0.79.0.wasm"
]
}
1 change: 0 additions & 1 deletion words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ ltex
Lxkf
mathchain
matklad
mdbook
merkle
micnncim
monomorphization
Expand Down