diff --git a/deno.ts b/deno.ts index ea42bced..138350f3 100644 --- a/deno.ts +++ b/deno.ts @@ -2,7 +2,7 @@ // Main entrypoint for Deno. // // TODO: find reasonable replacement for require logic. -import * as path from 'https://deno.land/std/path/mod.ts' +import * as path from 'https://deno.land/std@0.159.0/path/mod.ts' import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js' import { YargsParser } from './build/lib/yargs-parser.js' import type { Arguments, ArgsInput, Parser, Options, DetailedArguments } from './build/lib/yargs-parser-types.d.ts' diff --git a/lib/index.ts b/lib/index.ts index 3cc34257..8ca8c9de 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -39,6 +39,7 @@ const parser = new YargsParser({ resolve, // TODO: figure out a way to combine ESM and CJS coverage, such that // we can exercise all the lines below: + /* c8 ignore start */ require: (path: string) => { if (typeof require !== 'undefined') { return require(path) @@ -49,6 +50,7 @@ const parser = new YargsParser({ throw Error('only .json config files are supported in ESM') } } + /* c8 ignore stop */ }) const yargsParser: Parser = function Parser (args: ArgsInput, opts?: Partial): Arguments { const result = parser.parse(args.slice(), opts) diff --git a/package.json b/package.json index decd0c3f..d10e8cae 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "author": "Ben Coe ", "license": "ISC", "devDependencies": { + "@rollup/plugin-typescript": "^8.5.0", "@types/chai": "^4.2.11", "@types/mocha": "^9.0.0", "@types/node": "^16.11.4", @@ -68,11 +69,11 @@ "rimraf": "^3.0.2", "rollup": "^2.22.1", "rollup-plugin-cleanup": "^3.1.1", - "rollup-plugin-ts": "^3.0.2", "serve": "^14.0.0", "standardx": "^7.0.0", "start-server-and-test": "^1.11.2", "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 15fd65db..9e36123c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import cleanup from 'rollup-plugin-cleanup' -import ts from 'rollup-plugin-ts' +import ts from '@rollup/plugin-typescript' import transformDefaultExport from 'ts-transform-default-export' const output = {