Skip to content

Commit

Permalink
Update snapshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Feb 11, 2024
1 parent 734f4b6 commit 4d10205
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 79 deletions.
60 changes: 30 additions & 30 deletions packages/cli/tests/__snapshots__/Help.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ exports[`<Help /> > options > renders options (stripped) 1`] = `
[deprecated]
--flag Standard boolean option.
--num number Standard number option.
-C, --numberCountable number Number option that increments a count for each
occurence. (default: 10) [counter]
-n, --numberFixedList number A list of numbers to choose from. (choices: 1, 2, 3, 4,
5, 6, 7, 8, 9, 10) [deprecated]
--numWithArity number[] A multiple number option that requires an exact number
of values. [multiple(10)]
-C,--numberCountable number Number option that increments a count for each occurence.
(default: 10) [counter]
-n,--numberFixedList number A list of numbers to choose from. (choices: 1, 2, 3, 4, 5, 6, 7,
8, 9, 10) [deprecated]
--numWithArity number[] A multiple number option that requires an exact number of
values. [multiple(10)]
--str string Standard string option.
-s, --stringChoices string Choice list with strings. (choices: "foo", "bar",
"baz") (default: "bar")
-s,--stringChoices string Choice list with strings. (choices: "foo", "bar", "baz")
(default: "bar")
-S, --strList string[] String option list. [multiple]
-t, --no-truthyBool Flag that is on by default, so name should be negated.
(default: true)"
-t,--no-truthyBool Flag that is on by default, so name should be negated.
(default: true)"
`;

exports[`<Help /> > options > renders options 1`] = `
Expand All @@ -61,18 +61,18 @@ exports[`<Help /> > options > renders options 1`] = `
[deprecated]
--flag Standard boolean option.
--num number Standard number option.
-C, --numberCountable [90mnumber[39m Number option that increments a count for each
occurence. (default: 10) [90m[counter][39m
-n, --numberFixedList [90mnumber[39m A list of numbers to choose from. (choices: 1, 2, 3, 4,
5, 6, 7, 8, 9, 10) [90m[deprecated][39m
--numWithArity [90mnumber[][39m A multiple number option that requires an exact number
of values. [90m[multiple(10)][39m
-C,--numberCountable [90mnumber[39m Number option that increments a count for each occurence.
(default: 10) [90m[counter][39m
-n,--numberFixedList [90mnumber[39m A list of numbers to choose from. (choices: 1, 2, 3, 4, 5, 6, 7,
8, 9, 10) [90m[deprecated][39m
--numWithArity [90mnumber[][39m A multiple number option that requires an exact number of
values. [90m[multiple(10)][39m
--str string Standard string option.
-s, --stringChoices [90mstring[39m Choice list with strings. (choices: "foo", "bar",
"baz") (default: "bar")
-s,--stringChoices [90mstring[39m Choice list with strings. (choices: "foo", "bar", "baz")
(default: "bar")
-S, --strList string[] String option list. [multiple]
-t, --no-truthyBool Flag that is on by default, so name should be negated.
(default: true)"
-t,--no-truthyBool Flag that is on by default, so name should be negated.
(default: true)"
`;

exports[`<Help /> > params > doesnt render empty params 1`] = `""`;
Expand Down Expand Up @@ -123,18 +123,18 @@ exports[`<Help /> > renders everything 1`] = `
[deprecated]
--flag Standard boolean option.
--num number Standard number option.
-C, --numberCountable [90mnumber[39m Number option that increments a count for each
occurence. (default: 10) [90m[counter][39m
-n, --numberFixedList [90mnumber[39m A list of numbers to choose from. (choices: 1, 2, 3, 4,
5, 6, 7, 8, 9, 10) [90m[deprecated][39m
--numWithArity [90mnumber[][39m A multiple number option that requires an exact number
of values. [90m[multiple(10)][39m
-C,--numberCountable [90mnumber[39m Number option that increments a count for each occurence.
(default: 10) [90m[counter][39m
-n,--numberFixedList [90mnumber[39m A list of numbers to choose from. (choices: 1, 2, 3, 4, 5, 6, 7,
8, 9, 10) [90m[deprecated][39m
--numWithArity [90mnumber[][39m A multiple number option that requires an exact number of
values. [90m[multiple(10)][39m
--str string Standard string option.
-s, --stringChoices [90mstring[39m Choice list with strings. (choices: "foo", "bar",
"baz") (default: "bar")
-s,--stringChoices [90mstring[39m Choice list with strings. (choices: "foo", "bar", "baz")
(default: "bar")
-S, --strList string[] String option list. [multiple]
-t, --no-truthyBool Flag that is on by default, so name should be negated.
(default: true)"
-t,--no-truthyBool Flag that is on by default, so name should be negated.
(default: true)"
`;

exports[`<Help /> > usage > renders usage array 1`] = `
Expand Down
20 changes: 10 additions & 10 deletions packages/cli/tests/__snapshots__/IndexHelp.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ Boost v1.2.3 boost
[deprecated]
--flag Standard boolean option.
--num number Standard number option.
-C, --numberCountable [90mnumber[39m Number option that increments a count for each
occurence. (default: 10) [90m[counter][39m
-n, --numberFixedList [90mnumber[39m A list of numbers to choose from. (choices: 1, 2, 3, 4,
5, 6, 7, 8, 9, 10) [90m[deprecated][39m
--numWithArity [90mnumber[][39m A multiple number option that requires an exact number
of values. [90m[multiple(10)][39m
-C,--numberCountable [90mnumber[39m Number option that increments a count for each occurence.
(default: 10) [90m[counter][39m
-n,--numberFixedList [90mnumber[39m A list of numbers to choose from. (choices: 1, 2, 3, 4, 5, 6, 7,
8, 9, 10) [90m[deprecated][39m
--numWithArity [90mnumber[][39m A multiple number option that requires an exact number of
values. [90m[multiple(10)][39m
--str string Standard string option.
-s, --stringChoices [90mstring[39m Choice list with strings. (choices: "foo", "bar",
"baz") (default: "bar")
-s,--stringChoices [90mstring[39m Choice list with strings. (choices: "foo", "bar", "baz")
(default: "bar")
-S, --strList string[] String option list. [multiple]
-t, --no-truthyBool Flag that is on by default, so name should be negated.
(default: true)
-t,--no-truthyBool Flag that is on by default, so name should be negated.
(default: true)
"
`;

Expand Down
68 changes: 30 additions & 38 deletions packages/cli/tests/__snapshots__/Program.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ exports[`<Program /> > failure > renders when args parsing fails 1`] = `
Unknown option "--foo" found. Did you mean "help"? [ARG:OPTION_UNKNOWN_MORE]
[90m$ boost [31m--foo[39m[90m[39m
[90m$ boost [31m--foo[39m
 └───┘
"
`;
Expand Down Expand Up @@ -307,31 +307,27 @@ Boost v1.2.3 boost
 OPTIONS 
--deprecatedFlag A deprecated flag. [deprecated]
--deprecatedStringWithALongName [90mstring[39m Deprecated string option with
custom label. [90m[deprecated][39m
--deprecatedStringWithALongName Deprecated string option with custom label.
[90mstring[39m [90m[deprecated][39m
--flag Standard boolean option.
--num number Standard number option.
-C, --numberCountable number Number option that increments a
count for each occurence. (default:
10) [counter]
-n, --numberFixedList number A list of numbers to choose from.
(choices: 1, 2, 3, 4, 5, 6, 7, 8,
9, 10) [deprecated]
--numWithArity number[] A multiple number option that
requires an exact number of values.
[multiple(10)]
-C --numberCountable number Number option that increments a count for each
, occurence. (default: 10) [counter]
-n --numberFixedList number A list of numbers to choose from. (choices: 1, 2,
, 3, 4, 5, 6, 7, 8, 9, 10) [deprecated]
--numWithArity number[] A multiple number option that requires an exact
number of values. [multiple(10)]
--str string Standard string option.
-s, --stringChoices string Choice list with strings. (choices:
"foo", "bar", "baz") (default:
"bar")
-s --stringChoices string Choice list with strings. (choices: "foo", "bar",
, "baz") (default: "bar")
-S, --strList string[] String option list. [multiple]
-t, --no-truthyBool Flag that is on by default, so name
should be negated. (default: true)
-t --no-truthyBool Flag that is on by default, so name should be
, negated. (default: true)
Global
-h, --help Display help and usage menu
--locale [90mstring[39m Display output in the chosen locale
(default: "en")
--locale [90mstring[39m Display output in the chosen locale
(default: "en")
-v, --version Display version number
"
`;
Expand All @@ -354,31 +350,27 @@ Boost v1.2.3 boost
 OPTIONS 
--deprecatedFlag A deprecated flag. [deprecated]
--deprecatedStringWithALongName [90mstring[39m Deprecated string option with
custom label. [90m[deprecated][39m
--deprecatedStringWithALongName Deprecated string option with custom label.
[90mstring[39m [90m[deprecated][39m
--flag Standard boolean option.
--num number Standard number option.
-C, --numberCountable number Number option that increments a
count for each occurence. (default:
10) [counter]
-n, --numberFixedList number A list of numbers to choose from.
(choices: 1, 2, 3, 4, 5, 6, 7, 8,
9, 10) [deprecated]
--numWithArity number[] A multiple number option that
requires an exact number of values.
[multiple(10)]
-C --numberCountable number Number option that increments a count for each
, occurence. (default: 10) [counter]
-n --numberFixedList number A list of numbers to choose from. (choices: 1, 2,
, 3, 4, 5, 6, 7, 8, 9, 10) [deprecated]
--numWithArity number[] A multiple number option that requires an exact
number of values. [multiple(10)]
--str string Standard string option.
-s, --stringChoices string Choice list with strings. (choices:
"foo", "bar", "baz") (default:
"bar")
-s --stringChoices string Choice list with strings. (choices: "foo", "bar",
, "baz") (default: "bar")
-S, --strList string[] String option list. [multiple]
-t, --no-truthyBool Flag that is on by default, so name
should be negated. (default: true)
-t --no-truthyBool Flag that is on by default, so name should be
, negated. (default: true)
Global
-h, --help Display help and usage menu
--locale [90mstring[39m Display output in the chosen locale
(default: "en")
--locale [90mstring[39m Display output in the chosen locale
(default: "en")
-v, --version Display version number
"
`;
Expand All @@ -389,7 +381,7 @@ exports[`<Program /> > locale > errors for invalid \`--locale\` 1`] = `
Locale must be in the format of "en" or "en-US".
[90m$ boost [33m--locale[39m[90m wtf[39m
[90m$ boost [33m--locale[90m wtf[39m
 └──────┘
"
`;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tests/components/HiddenInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('HiddenInput', () => {
expect(lastFrame()).toMatchSnapshot();
});

it.only('calls `onChange` with unmasked value', async () => {
it('calls `onChange` with unmasked value', async () => {
const spy = vi.fn();
const { stdin } = render(<HiddenInput {...props} onChange={spy} />);

Expand Down
5 changes: 5 additions & 0 deletions website/docs/migrate/5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ TODO
- Migrated from `resolve` to `enhanced-resolve` for `PathResolver`. This is to support
`package.json` exports. We currently support the `import`, `require`, and `node` conditions.

## @boost/cli

- Upgraded to and now requires React v18.
- Upgraded to and now requires Ink v4. Now uses a WASM based Yoga engine.

## @boost/plugin

- Updated the `Loader` to use dynamic `import()` for loading modules, instead of our `requireModule`
Expand Down

0 comments on commit 4d10205

Please sign in to comment.