Skip to content

Commit fc179f4

Browse files
authored
Merge pull request #103 from algorandfoundation/update-dep
feat: update puya-ts dependency versions
2 parents 32b0078 + 8989a8a commit fc179f4

File tree

3 files changed

+24
-37
lines changed

3 files changed

+24
-37
lines changed

package-lock.json

Lines changed: 18 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
"vitest": "3.2.4"
6969
},
7070
"dependencies": {
71-
"@algorandfoundation/algorand-typescript": "1.0.0-alpha.90",
72-
"@algorandfoundation/puya-ts": "1.0.0-alpha.90",
71+
"@algorandfoundation/algorand-typescript": "1.0.0-alpha.99",
72+
"@algorandfoundation/puya-ts": "1.0.0-alpha.99",
7373
"elliptic": "^6.6.1",
7474
"js-sha256": "^0.11.0",
7575
"js-sha3": "^0.9.3",

src/test-transformer/visitors.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LoggingContext, ptypes, SourceLocation, TypeResolver } from '@algorandfoundation/puya-ts'
1+
import { AbsolutePath, LoggingContext, ptypes, SourceLocation, TypeResolver } from '@algorandfoundation/puya-ts'
22
import path from 'path'
33
import ts from 'typescript'
44
import { CodeError } from '../errors'
@@ -56,7 +56,8 @@ export class SourceFileVisitor {
5656
this.context = { ...context, currentDirectory: program.getCurrentDirectory() }
5757
const typeChecker = program.getTypeChecker()
5858
const loggingContext = LoggingContext.create()
59-
const typeResolver = new TypeResolver(typeChecker, program.getCurrentDirectory())
59+
const programDir = AbsolutePath.resolve({ path: program.getCurrentDirectory() })
60+
const typeResolver = new TypeResolver(typeChecker, programDir)
6061
this.helper = {
6162
additionalStatements: [],
6263
resolveType(node: ts.Node): ptypes.PType {
@@ -83,7 +84,7 @@ export class SourceFileVisitor {
8384
},
8485
sourceLocation(node: ts.Node): SourceLocation {
8586
try {
86-
return SourceLocation.fromNode(node, program.getCurrentDirectory())
87+
return SourceLocation.fromNode(node, programDir)
8788
} catch {
8889
return SourceLocation.None
8990
}

0 commit comments

Comments
 (0)