Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 1, 2023

This PR contains the following updates:

Package Change Age Confidence
vest (source) 3.2.8 -> 5.4.6 age confidence

Release Notes

ealush/vest (vest)

v5.4.6

Compare Source

v5.4.5

Compare Source

v5.4.4

Compare Source

v5.4.3

Compare Source

v5.4.2

Compare Source

v5.4.1

Compare Source

v5.4.0

Compare Source

Brings a major performance boost to Suites with many (100+) fields.

v5.3.0

Compare Source

v5.2.12

Compare Source

v5.2.11

Compare Source

v5.2.10

Compare Source

v5.2.9

Compare Source

v5.2.8

Compare Source

v5.2.7

Compare Source

v5.2.6

Compare Source

v5.2.5

Compare Source

v5.2.4

Compare Source

v5.2.3

Compare Source

v5.2.2

Compare Source

v5.2.1

Compare Source

v5.2.0

Compare Source

v5.1.5

Compare Source

v5.1.4

Compare Source

v5.1.3

Compare Source

v5.1.2

Compare Source

v5.1.1

Compare Source

v5.1.0

Compare Source

v5.0.5

Compare Source

v5.0.4

Compare Source

v5.0.3

Compare Source

v5.0.2

Compare Source

v5.0.1: [email protected]

Compare Source

Major version of Vest 5.0.0

Upgrading from V4 to V5

Migration guide

Vest 5 is mostly compatible with Vest 4, but some changes were made. In most cases, if you do not change anything, vest will keep working as it did before. However, to take advantage of the new features, you'll need to make some changes.

Eager execution mode is now the default

In previous versions of Vest, Vest continued validating fields even after one of their tests had failed. V5 changes that to improve the runtime performance, and instead, Vest will halt further validations of a given field if it failed. This was an opt-in feature, and it can now be removed.

- import {create, test, eager} from 'vest';
+ import {create, test} from 'vest';

const suite = create(() => {
- eager();

  test(/*...*/);
});

To bring back the previous behavior, use the mode function that alters the execution mode:

- import {create, test} from 'vest';
+ import {create, test, mode, Modes} from 'vest';

const suite = create(() => {
+ eager(Modes.ALL);

  test(/*...*/);
});

This also means that if you've used skipWhen to avoid running of failing fields, you can now remove it:

- import {create, test, skipWhen} from 'vest';
+ import {create, test} from 'vest';

const suite = create(() => {

- skipWhen(res => res.hasErrors('username'), () => {
    test('username', 'username already taken', () => {
      // ...
    });
- });
});

All result methods are now available directly on the suite object

In previous versions, you had to call suite.get() to access the different methods, such as getErrors and isValid. In V5, these methods are available directly on the suite object.

- suite.get().getErrors('username');
+ suite.getErrors('username')

- suite.get().isValid();
+ suite.isValid()

Added hasError and hasWarning methods

The result object has two new methods: hasError and hasWarning. They return a boolean value indicating whether a given field has an error or a warning. With these new methods, you can display the first error of a field.

- res.getErrors('username')[0]
+ res.hasError('username')

Removed skip.group and only.group

Vest 5 removes the dedicated group interface for skip and only, and instead allows you to call skip and only directly within the groups.

const suite = create(() => {
- skip.group('group1', 'username');

  group('group1', () => {
+   skip('username');

    test('username', 'message', () => {
      // ...
    });
  });
});
const suite = create(() => {
- skip.group('group1');

  group('group1', () => {
+   skip(true);

    test('field1', 'message', () => {
      // ...
    });
  });
});

Optional fields now take into account the suite params

In previous versions, optional fields only took into consideration whether the tests ran or not. In V5 optional fields also search the data object passed to the suite. If it has an object with the optional field in it, and the optional field is blank - the test will be considered valid even if it is not passing.

Server side validations are built-in

In previous versions, as a user of Vest you had to set up your own state-reset mechanism. Vest now has a staticSuite export that does that for you.

- import {create} from 'vest';
+ import {staticSuite} from 'vest';

- const suite = create(() => {/*...*/});
+ const suite = staticSuite(() => /*...*/});

- function ServerValidation() {
-  suite.reset();
-  suite();
- }

First-Class-Citizen typescript support

All of Vest's methods are now typed and make use of generics to enforce correct usage throughout your suite.

Dropped support for <ES2015

Vest 5 uses Javascript Proxies, which were introduced in ES2015. Therefore, Vest 5 no longer supports pre-ES2015 versions of Javascript. If you need to support older browsers, you can still use Vest 4.

v5.0.0

Compare Source

v4.6.9

Compare Source

v4.6.8

Compare Source

v4.6.7

Compare Source

v4.6.6

Compare Source

v4.6.5

Compare Source

v4.6.4

Compare Source

v4.6.3

Compare Source

v4.6.2

Compare Source

v4.6.1

Compare Source

v4.6.0

Compare Source

d7d0893 feat(vest): Add boolean control for optional fields (#​910) (Evyatar)
8284ce2 patch(vest): use string module from vest-utils (ealush)

v4.5.0

Compare Source

9b46fb6 types(vest): add suiteName type to SuiteResult (ealush)
b94b568 patch(vest): use suiteSelectors from vest top level api in parser module (ealush)
24e4cea added(vest): expose suiteSelectors as a top level API (ealush)
1812e68 patch(vest): remove unneeded base object in context assignment (ealush)
590ad76 patch(vest): Remove suiteSummary from context (ealush)
e8dbbc9 patch(vest): move suite selectors out into their own module for easier consumption by external sources (#​906) (Evyatar)
8597af2 patch(vest): Call done callback immediately when field does not exist (ealush)
17c39f6 types(vest): improve getFailures overload (ealush)
d4d4cb1 patch(vest): Remove unneeded empty check in hasRemainigTests (ealush)

v4.4.2

Compare Source

b062abb types(vest): Add a dedicated VestTests plural type (ealush)
f28a1a6 tests(vest): Completely remove itWithContext (ealush)

v4.4.1

Compare Source

870a2ed tests(vest): Remove most itWithContext instances from tests (ealush)
1944122 patch(vest): use isolate hook directly (ealush)
33cd6d9 patch(vest): Use the same test mutation function everywhere (ealush)

v4.4.0

a5db77c tests(vest): Add sanity tests for group validity (ealush)
49096b1 patch(vest): replace Cursor with IsolateCursor (#​869) (Evyatar)
4dbb9c0 minor(vest): isValidByGroup (#​856) (Evyatar)
6a67315 tests(vest): make test.memo test more resilient (ealush)

v4.0.0: 4️⃣ Vest 4

Compare Source

Vest's fourth major, a full rewrite in typescript, many new features and bugfixes.

The migration guide can be found here


Configuration

📅 Schedule: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies label Oct 1, 2023
@changeset-bot
Copy link

changeset-bot bot commented Oct 1, 2023

⚠️ No Changeset found

Latest commit: bfeebea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@renovate renovate bot force-pushed the renovate/vest-5.x branch from a372778 to 96930b3 Compare October 2, 2023 08:05
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 96930b3 to cb9eb2c Compare October 25, 2023 20:21
@renovate renovate bot force-pushed the renovate/vest-5.x branch 2 times, most recently from 93f8f5b to 9f31a58 Compare November 9, 2023 22:59
@renovate renovate bot force-pushed the renovate/vest-5.x branch 3 times, most recently from d5bdfd1 to 728877d Compare December 1, 2023 19:37
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 728877d to d523bb2 Compare December 16, 2023 19:51
@renovate renovate bot force-pushed the renovate/vest-5.x branch 3 times, most recently from 917a15d to ec3d6e4 Compare January 3, 2024 17:00
@renovate renovate bot force-pushed the renovate/vest-5.x branch from ec3d6e4 to 3ecce27 Compare January 17, 2024 00:08
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 3ecce27 to eb8e10d Compare January 29, 2024 23:23
@renovate renovate bot force-pushed the renovate/vest-5.x branch from eb8e10d to 783fde3 Compare February 19, 2024 02:07
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 783fde3 to 286d34c Compare March 1, 2024 00:59
@renovate renovate bot force-pushed the renovate/vest-5.x branch 2 times, most recently from 7b64dd0 to 50b4603 Compare April 3, 2024 14:20
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 50b4603 to 7f6bbe0 Compare June 15, 2024 18:59
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 7f6bbe0 to f9a10a5 Compare July 22, 2024 09:42
@renovate renovate bot force-pushed the renovate/vest-5.x branch from f9a10a5 to f321392 Compare August 7, 2024 14:14
@renovate renovate bot force-pushed the renovate/vest-5.x branch from f321392 to 92fbd74 Compare September 5, 2024 20:37
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 92fbd74 to f97a360 Compare September 20, 2024 04:04
@renovate renovate bot force-pushed the renovate/vest-5.x branch from f97a360 to fcea9e1 Compare November 11, 2024 16:01
@renovate renovate bot force-pushed the renovate/vest-5.x branch from fcea9e1 to 2cbf054 Compare November 25, 2024 12:04
@renovate renovate bot force-pushed the renovate/vest-5.x branch from 2cbf054 to bfeebea Compare December 19, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant