Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: isaacs/jackspeak
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.0
Choose a base ref
...
head repository: isaacs/jackspeak
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.1.1
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on May 21, 2024

  1. changelog 3.1

    isaacs committed May 21, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    isaacs isaacs
    Copy the full SHA
    ceafc9b View commit details
  2. ci: drop node 16, 18

    isaacs committed May 21, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    isaacs isaacs
    Copy the full SHA
    6c58000 View commit details
  3. loosen types on *List methods

    We don't have to pass in 'multiple: true' on these, the method does it.
    isaacs committed May 21, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    isaacs isaacs
    Copy the full SHA
    0d6e8cf View commit details
  4. 3.1.1

    isaacs committed May 21, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    isaacs isaacs
    Copy the full SHA
    89c31f5 View commit details
Showing with 13 additions and 8 deletions.
  1. +1 −1 .github/workflows/ci.yml
  2. +5 −0 changelog.md
  3. +2 −2 package-lock.json
  4. +1 −1 package.json
  5. +4 −4 src/index.ts
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [20.x, 22.x]
platform:
- os: ubuntu-latest
shell: bash
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.1

- Add `validOptions` config option, to specify a discrete set of
acceptable values.

# 3.0

- Move custom `Error` fields to the `cause` property where they
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jackspeak",
"version": "3.1.0",
"version": "3.1.1",
"description": "A very strict and proper argument parser.",
"tshy": {
"main": true,
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ export type ConfigOptionMeta<
* A set of {@link ConfigOptionMeta} fields, referenced by their longOption
* string values.
*/
export type ConfigMetaSet<T extends ConfigType, M extends boolean> = {
export type ConfigMetaSet<T extends ConfigType, M extends boolean = boolean> = {
[longOption: string]: ConfigOptionMeta<T, M>
}

@@ -1006,7 +1006,7 @@ export class Jack<C extends ConfigSet = {}> {
/**
* Add one or more multiple number fields.
*/
numList<F extends ConfigMetaSet<'number', true>>(
numList<F extends ConfigMetaSet<'number'>>(
fields: F,
): Jack<C & ConfigSetFromMetaSet<'number', true, F>> {
return this.#addFields(fields, numList)
@@ -1024,7 +1024,7 @@ export class Jack<C extends ConfigSet = {}> {
/**
* Add one or more multiple string option fields.
*/
optList<F extends ConfigMetaSet<'string', true>>(
optList<F extends ConfigMetaSet<'string'>>(
fields: F,
): Jack<C & ConfigSetFromMetaSet<'string', true, F>> {
return this.#addFields(fields, optList)
@@ -1042,7 +1042,7 @@ export class Jack<C extends ConfigSet = {}> {
/**
* Add one or more multiple flag fields.
*/
flagList<F extends ConfigMetaSet<'boolean', true>>(
flagList<F extends ConfigMetaSet<'boolean'>>(
fields: F,
): Jack<C & ConfigSetFromMetaSet<'boolean', true, F>> {
return this.#addFields(fields, flagList)