Skip to content

Commit

Permalink
Merge pull request #37 from Roaders/tsVersions
Browse files Browse the repository at this point in the history
Ts versions
  • Loading branch information
Roaders authored Apr 12, 2023
2 parents 13287f2 + 88a6b69 commit 0614591
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x]
node-version: [ 14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Compatible Typescript Versions

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
typescript-version: [4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9 ]

steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: npm ci
- run: npm install typescript@${{ matrix.typescript-version }}
- run: npm run build-release
17 changes: 9 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-command-line-args",
"version": "2.4.2",
"version": "2.5.0",
"description": "A Typescript wrapper around command-line-args with additional support for markdown usage guide generation",
"bin": {
"write-markdown": "dist/write-markdown.js"
Expand Down Expand Up @@ -60,6 +60,7 @@
"@types/command-line-args": "^5.0.0",
"@types/command-line-usage": "^5.0.1",
"@types/jest": "^27.5.1",
"@types/node": "^16.18.23",
"@types/string-format": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
Expand Down
6 changes: 3 additions & 3 deletions src/contracts.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export type ArgumentConfig<T extends { [name: string]: any }> = {
export type ArgumentConfig<T> = {
[P in keyof T]-?: PropertyConfig<T[P]>;
};

export type ArgumentOptions<T extends { [name: string]: any }> = {
export type ArgumentOptions<T> = {
[P in keyof T]-?: PropertyOptions<T[P]>;
};

Expand Down Expand Up @@ -119,7 +119,7 @@ export interface UsageGuideOptions {
optionSections?: OptionContent[];
}

export interface ArgsParseOptions<T extends { [name: string]: any }> extends UsageGuideOptions {
export interface ArgsParseOptions<T> extends UsageGuideOptions {
/**
* An array of strings which if present will be parsed instead of `process.argv`.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/insert-code.helper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe(`(${insertCode.name}) insert-code.helper`, () => {

try {
await insertCode({ fileContent, filePath: `${sampleDirName}/'originalFilePath.ts` }, createOptions());
} catch (e) {
} catch (e: any) {
error = e;
}

Expand Down

0 comments on commit 0614591

Please sign in to comment.