-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix peer deps, remove redundant deps #1046
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
theme:api
Javascript API related issue
theme:mocha
Mocha related issue
theme:jest
Jest related issue
theme:cucumberjs
CucumberJS related issue
theme:jasmine
Jasmine related issue
theme:playwright
theme:newman
theme:codeceptjs
theme:vitest
labels
Jul 5, 2024
baev
approved these changes
Jul 5, 2024
@cucumber/cucumber 10.8.0+ is required due to the usage of `world`. The lower bound of @cucumber/messages is 24.1.0 because that's the exact version [email protected] pins
We support cypress 12.17.4 or greater is supported. Older versions use webpack 4, which can't handle null coalescing operator
We support jasmine 2.7.0+ (since async support)
We support jest 28+ since we rely on the new environment constructor signature introduced in 28.0.0
We support playwright 1.36.0+ because of suite.allTests
Vitest 1.3.0+ is supported. We rely on the ability to provide a reporter's options via the config file which was introduced in 1.3.0
Newman version 3.5.0+ is supported
epszaw
approved these changes
Jul 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
theme:api
Javascript API related issue
theme:codeceptjs
theme:cucumberjs
CucumberJS related issue
theme:jasmine
Jasmine related issue
theme:jest
Jest related issue
theme:mocha
Mocha related issue
theme:newman
theme:playwright
theme:vitest
type:dependencies
Pull requests that update a dependency file
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Peer dependencies (Yarn PnP and version warnings support)
The main focus of this PR is to improve Yarn PnP support by properly declaring all runtime dependencies in manifests.
Many Allure packages import packages of the test frameworks. Those could be top-level packages (
vitest
,mocha
), or packages, that are transitive dependencies of some top-level package (e.g., allure-vitest imports@vitest/runner
, which is a transitive dependency ofvitest
).Yarn PnP requires such packages to be present in the manifest. E.g.,
@vitest/runner
must be declared as a dependency ofallure-vitest
. Otherwise, Yarn PnP considers it a ghost dependency and fails the import.Such dependencies are parts of the execution runtime and are installed separately. Therefore, in this PR those are declared as peer dependencies. It prevents unwanted isolation between the version that comes with the test framework (e.g., after
yarn install vitest
) and the version that otherwise would've been chosen by our package (e.g., afteryarn install allure-vitest
).Additionally, is allows to show a warning in case the user installs an unsupported version of the test framework.
Additionally, some Allure packages don't import test framework packages at runtime while are still intended to be run in the test framework environment (e.g., allure-jasmine doesn't import Jasmine packages at runtime). The PR declares such dependencies as optional peer dependencies. It allows users to introduce such packages in any way they find suitable (e.g., Jasmin, although not recommended, could be installed globally) while keeping the unsupported version warnings.
The downside is that Yarn PnP users have to install all non-optional peer dependencies explicitly. I.e., instead of
yarn add -D vitest allure-vitest
they have to runyarn add -D vitest @vitest/runner allure-vitest
.Peer dependencies table
Note
I've specified version ranges as
>=min-version
. That allows users to use newer versions of test frameworks, which often don't break anything, without waiting for us to update the manifest. Alternatively, we may cap the ranges with the current major versions. That will still allow users to update test frameworks but will show them the version mismatch warning until we release the version with updated peer dependencies.jasmine
namespace; allow global installRedundant dependencies
The PR removes the following redundant dependencies:
expect,
ts-node`@cucumber/gherkin
,@cucumber/gherkin-streams
,@cucumber/gherkin-utils
,@cucumber/message-streams
,@types/chai
,@types/chai-like
,@types/chai-things
,@types/glob
,@types/sinon
,chai
,chai-like
,chai-things
,sinon
,ts-node
.@types/glob
,@types/mocha
,enquirer
,ts-node
tslib
@jest-core
,@types/source-map-support
,source-map-support
,ts-node
,tslib
@types/source-map-support
,expect
,source-map-support
,ts-node
,tslib
@types-chai
,chai
,chai-like
,chai-things
,source-map-support
,ts-node
,tslib
vite
@types/source-map-support
,expect
,source-map-support
,ts-node
,tslib
Other changes