Skip to content

Commit

Permalink
fix: temporarily disabling tschecks on typed clients; until algosdk i…
Browse files Browse the repository at this point in the history
…s updated for ARC22
  • Loading branch information
aorumbayev committed Jul 31, 2024
1 parent 6f21340 commit e15b7ef
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
1 change: 1 addition & 0 deletions examples/duplicate_structs/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck
/**
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
* DO NOT MODIFY IT BY HAND.
Expand Down
1 change: 1 addition & 0 deletions examples/helloworld/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck
/**
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
* DO NOT MODIFY IT BY HAND.
Expand Down
1 change: 1 addition & 0 deletions examples/lifecycle/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck
/**
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
* DO NOT MODIFY IT BY HAND.
Expand Down
1 change: 1 addition & 0 deletions examples/minimal/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck
/**
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
* DO NOT MODIFY IT BY HAND.
Expand Down
1 change: 1 addition & 0 deletions examples/state/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck
/**
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
* DO NOT MODIFY IT BY HAND.
Expand Down
1 change: 1 addition & 0 deletions examples/voting/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
// @ts-nocheck
/**
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
* DO NOT MODIFY IT BY HAND.
Expand Down
4 changes: 3 additions & 1 deletion scripts/update-approvals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import * as path from 'path'
import { colorConsole } from '../src/util/color-console'

function updateApprovals() {
const dirs = ['helloworld', 'lifecycle', 'minimal', 'state', 'voting'].map((app) => path.join(process.cwd(), 'examples', app))
const dirs = ['helloworld', 'lifecycle', 'minimal', 'state', 'voting', 'duplicate_structs'].map((app) =>
path.join(process.cwd(), 'examples', app),
)

for (const exampleDir of dirs) {
const generatedPath = path.join(exampleDir, 'client.generated.ts')
Expand Down
1 change: 1 addition & 0 deletions src/client/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { callComposerType } from './call-composer-types'
export function* generate(app: AlgoAppSpec, options: GeneratorOptions = { preserveNames: false }): DocumentParts {
const ctx = createGeneratorContext(app, options)
yield `/* eslint-disable */`
yield `// @ts-nocheck`
yield `/**`
yield ` * This file was automatically generated by @algorandfoundation/algokit-client-generator.`
yield ` * DO NOT MODIFY IT BY HAND.`
Expand Down
2 changes: 1 addition & 1 deletion src/tests/approval-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('When generating a ts client for a the contract', () => {
if (writeActual) fs.writeFileSync(path.join(dir, `client.generated.ts`), result)

const approvedClient = fs.readFileSync(path.join(dir, `client.ts`), 'utf-8')

console.log(path.join(dir, `client.ts`))

Check warning on line 21 in src/tests/approval-tests.spec.ts

View workflow job for this annotation

GitHub Actions / pull_request / node-ci

Unexpected console statement

Check warning on line 21 in src/tests/approval-tests.spec.ts

View workflow job for this annotation

GitHub Actions / pull_request / node-ci

Unexpected console statement
expect(result).toBe(approvedClient)
})
})

0 comments on commit e15b7ef

Please sign in to comment.