diff --git a/lib/index.ts b/lib/index.ts index 37f2322b..7254a34a 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -194,7 +194,7 @@ class Y18N { err.message = 'syntax error in ' + languageFile } - if (err.code === 'ENOENT') localeLookup = {} + if ((err as { code?: string }).code === 'ENOENT') localeLookup = {} else throw err } diff --git a/lib/platform-shims/deno.ts b/lib/platform-shims/deno.ts index 3cd243ea..8c38ee70 100644 --- a/lib/platform-shims/deno.ts +++ b/lib/platform-shims/deno.ts @@ -1,7 +1,7 @@ /* global Deno */ -import { posix } from 'https://deno.land/std/path/mod.ts' -import { sprintf } from 'https://deno.land/std/fmt/printf.ts' +import { posix } from 'https://deno.land/std@0.159.0/path/mod.ts' +import { sprintf } from 'https://deno.land/std@0.159.0/fmt/printf.ts' export default { fs: { diff --git a/package.json b/package.json index 4e5c1ca6..f456c845 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ "prepare": "npm run compile" }, "devDependencies": { + "@rollup/plugin-typescript": "^8.5.0", "@types/node": "^14.6.4", - "@wessberg/rollup-plugin-ts": "^1.3.1", "c8": "^7.3.0", "chai": "^4.0.1", "cross-env": "^7.0.2", @@ -52,6 +52,7 @@ "rollup": "^2.26.10", "standardx": "^7.0.0", "ts-transform-default-export": "^1.0.2", + "tslib": "^2.4.1", "typescript": "^4.0.0" }, "files": [ diff --git a/rollup.config.js b/rollup.config.js index 537ce1e7..b3b1a025 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,4 @@ -import ts from '@wessberg/rollup-plugin-ts' +import ts from '@rollup/plugin-typescript' import transformDefaultExport from 'ts-transform-default-export' const output = {