-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `engines.node` field should be the same as `stylelint`'s `engines.node` (peer dependency).
- Loading branch information
1 parent
dc2e756
commit b6f1895
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const { execFileSync } = require('child_process'); | ||
const pkg = require('../package.json'); | ||
|
||
describe('engines.node', () => { | ||
it("is the same as stylelint's one", () => { | ||
const stylelintVersion = pkg.peerDependencies.stylelint; | ||
const [nodeVersion] = JSON.parse( | ||
execFileSync('npm', [ | ||
'view', | ||
'--json', | ||
`stylelint@${stylelintVersion}`, | ||
'engines.node', | ||
]).toString(), | ||
); | ||
|
||
expect(nodeVersion).toEqual(pkg.engines.node); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,5 +66,8 @@ | |
}, | ||
"peerDependencies": { | ||
"stylelint": "^15.5.0" | ||
}, | ||
"engines": { | ||
"node": "^14.13.1 || >=16.0.0" | ||
} | ||
} |