Skip to content
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

Extend version range for eslint-plugin-playwright #954

Merged
merged 3 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/green-crabs-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sumup/foundry": minor
---

Extended the supported version range for `eslint-plugin-playwright` to include v1.x.
8 changes: 4 additions & 4 deletions src/lib/options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,22 +271,22 @@ describe('options', () => {

expect(logger.warn).toHaveBeenCalledOnce();
expect(logger.warn).toHaveBeenCalledWith(
'"eslint-config-next" is installed at version "^9.0.0". Foundry has only been tested with versions ">=10.0.0". You may find that it works just fine, or you may not.',
'"eslint-config-next" is installed at version "^9.0.0". Foundry has only been tested with versions ">=10.0.0". You may find that it works just fine, or you may not. Pull requests welcome!',
);
});

it('should log a warning if a plugin is installed at a higher version than has been tested with Foundry', () => {
const packageJson = {
...basePackageJson,
license: 'MIT',
dependencies: { 'eslint-plugin-playwright': '^1.0.0' },
dependencies: { 'eslint-plugin-playwright': '^2.0.0' },
};

warnAboutUnsupportedPlugins(packageJson);

expect(logger.warn).toHaveBeenCalledOnce();
expect(logger.warn).toHaveBeenCalledWith(
'"eslint-plugin-playwright" is installed at version "^1.0.0". Foundry has only been tested with versions ">=0.17.0 <1.0.0". You may find that it works just fine, or you may not.',
'"eslint-plugin-playwright" is installed at version "^2.0.0". Foundry has only been tested with versions ">=0.17.0 <2.0.0". You may find that it works just fine, or you may not. Pull requests welcome!',
);
});

Expand All @@ -304,7 +304,7 @@ describe('options', () => {

expect(logger.warn).toHaveBeenCalledOnce();
expect(logger.warn).toHaveBeenCalledWith(
'"@sumup/eslint-plugin-circuit-ui" is installed at version "1.0.0". Foundry has only been tested with versions ">=3.0.0 <5.0.0". You may find that it works just fine, or you may not.',
'"@sumup/eslint-plugin-circuit-ui" is installed at version "1.0.0". Foundry has only been tested with versions ">=3.0.0 <5.0.0". You may find that it works just fine, or you may not. Pull requests welcome!',
);
});

Expand Down
4 changes: 2 additions & 2 deletions src/lib/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const PLUGINS = [
name: Plugin.PLAYWRIGHT,
frameworkPackages: ['@playwright/test'],
pluginPackage: 'eslint-plugin-playwright',
supportedRange: '>=0.17.0 <1.0.0',
supportedRange: '>=0.17.0 <2.0.0',
},
{
name: Plugin.STORYBOOK,
Expand Down Expand Up @@ -202,7 +202,7 @@ export function warnAboutUnsupportedPlugins(packageJson: PackageJson): void {

if (!isSupported) {
logger.warn(
`"${pluginPackage}" is installed at version "${version}". Foundry has only been tested with versions "${supportedRange}". You may find that it works just fine, or you may not.`,
`"${pluginPackage}" is installed at version "${version}". Foundry has only been tested with versions "${supportedRange}". You may find that it works just fine, or you may not. Pull requests welcome!`,
);
}
} catch (error) {
Expand Down
Loading