diff --git a/package-lock.json b/package-lock.json index e66f8e2..f038844 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@solana-developers/helpers", - "version": "2.5.4", + "version": "2.5.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@solana-developers/helpers", - "version": "2.5.4", + "version": "2.5.6", "license": "MIT", "dependencies": { "@solana/spl-token": "^0.4.8", diff --git a/src/lib/keypair.ts b/src/lib/keypair.ts index 7c96820..2801c1e 100644 --- a/src/lib/keypair.ts +++ b/src/lib/keypair.ts @@ -10,7 +10,6 @@ export const keypairToSecretKeyJSON = (keypair: Keypair): string => { export const getKeypairFromFile = async (filepath?: string) => { // Node-specific imports - // @ts-expect-error TODO: fix the warning rather than disabling it when we have time const path = await import("node:path"); // Work out correct file name if (!filepath) { @@ -27,7 +26,6 @@ export const getKeypairFromFile = async (filepath?: string) => { let fileContents: string; try { // Node-specific imports - // @ts-expect-error TODO: fix the warning rather than disabling it when we have time const { readFile } = await import("node:fs/promises"); const fileContentsBuffer = await readFile(filepath); fileContents = fileContentsBuffer.toString(); @@ -86,7 +84,6 @@ export const addKeypairToEnvFile = async ( envFileName?: string, ) => { // Node-specific imports - // @ts-expect-error TODO: fix the warning rather than disabling it when we have time const { appendFile } = await import("node:fs/promises"); if (!envFileName) { envFileName = ".env"; @@ -105,4 +102,4 @@ export const addKeypairToEnvFile = async ( // Shout out to Dean from WBA for this technique export const makeKeypairs = (amount: number): Array => { return Array.from({ length: amount }, () => Keypair.generate()); -}; \ No newline at end of file +}; diff --git a/tsconfig.json b/tsconfig.json index 1f88001..46abce4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,8 @@ { "compilerOptions": { - "target": "ES2018", - "lib": ["ES2018", "DOM"], + "target": "ES2022", + "module": "ES2022", + "lib": ["ES2022", "DOM"], "moduleResolution": "node", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, @@ -13,4 +14,4 @@ }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] -} \ No newline at end of file +}