Skip to content

Commit 8b1c580

Browse files
committed
BREAKING: Move vnu-jar to peerDependencies
1 parent 1a5ff04 commit 8b1c580

4 files changed

Lines changed: 24 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Install this grunt plugin next to your project's [Gruntfile.js][getting_started] with:
1212

1313
```bash
14-
npm install grunt-html -D
14+
npm install grunt-html vnu-jar -D
1515
```
1616

1717
Then add this line to your project's `Gruntfile.js`:
@@ -183,6 +183,7 @@ Use this option to control the number of threads that grunt-html will use when v
183183
## Potential pitfalls
184184

185185
* vnu.jar requires Java 8 environment or up.
186+
* As of v19.0.0, `vnu-jar` is no longer a bundled dependency and must be installed separately: `npm install vnu-jar -D`.
186187

187188
## License
188189

lib/javaArgs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
'use strict';
22

3-
const jar = require('vnu-jar');
3+
let jar;
4+
try {
5+
jar = require('vnu-jar');
6+
} catch {
7+
throw new Error('vnu-jar is not installed. Run `npm install vnu-jar` to install it.');
8+
}
49

510
// Determine proper jarfile arguments
611
function javaArgs(java, chunk, config) {

package-lock.json

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
},
2929
"dependencies": {
3030
"async": "^3.2.6",
31-
"picocolors": "^1.1.1",
32-
"vnu-jar": "25.11.3"
31+
"picocolors": "^1.1.1"
3332
},
3433
"devDependencies": {
3534
"@lodder/time-grunt": "^4.0.0",
@@ -39,10 +38,12 @@
3938
"mocha": "^11.7.5",
4039
"start-server-and-test": "^3.0.4",
4140
"strip-ansi": "^6.0.1",
41+
"vnu-jar": "26.5.12",
4242
"xo": "^2.0.2"
4343
},
4444
"peerDependencies": {
45-
"grunt": ">=0.4.0"
45+
"grunt": ">=0.4.0",
46+
"vnu-jar": ">=25.11.3"
4647
},
4748
"keywords": [
4849
"gruntplugin"

0 commit comments

Comments
 (0)