Addressed copilot suggestions

This commit is contained in:
gowridurgad 2026-02-17 14:54:43 +05:30
parent b50e0ad9a6
commit c5d7f62348
2 changed files with 21 additions and 18 deletions

View File

@ -112,6 +112,8 @@ describe('main tests', () => {
${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'}
${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}}'} | ${'22.0.0'}
${'{"devEngines": {"runtime": [{"name": "bun"}, {"name": "node", "version": "22.0.0"}]}}'} | ${'22.0.0'}
${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}, "engines": {"node": "18.0.0"}}'} | ${'22.0.0'}
${'{"volta": {"node": "16.0.0"}, "devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}, "engines": {"node": "18.0.0"}}'} | ${'16.0.0'}
`.it('parses "$contents"', ({contents, expected}) => {
const existsSpy = jest.spyOn(fs, 'existsSync');
existsSpy.mockImplementation(() => true);

View File

@ -112,6 +112,7 @@ When using the `package.json` input, the action will look in the following field
  }
}
```
**Note:** The devEngines.runtime can either be an object or an array of objects
## Architecture