Skip to content

Commit

Permalink
Extend version range for eslint-plugin-playwright (#954)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Mar 14, 2024
1 parent 7f8d8e7 commit 08122eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
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

0 comments on commit 08122eb

Please sign in to comment.