Upgrading from 0.4 to 1.0
Old versions, such as 1.5 and older are no longer maintained. Find out more and see additional support options here.
This guide is here to help you update your projects and plugins from Grunt 0.4.x to Grunt 1.0.
Be advised Grunt 1.0.0 no longer supports Node.js v0.8.
For Projects that use Grunt
Peer Dependencies
You might receive peerDependencies errors when you install a project with Grunt 1.0.
We ask you to send pull requests to your favourite plugins and ask them to update the peerDependencies section of their package.json.
See below for details about plugin updates.
For Plugins and Plugin developers
Peer Dependencies
If you have a Grunt plugin that includes grunt in the peerDependencies section of your package.json, we recommend tagging with "grunt": ">=0.4.0". Otherwise when [email protected] is released, npm@2 users will receive a hard error when trying to install your plugin and npm@3 users will get a warning.
Be aware, peer dependencies are no longer installed for users as of npm@3. Users of Grunt plugins are expected to npm install grunt --save-dev alongside any Grunt plugin install.
We ask you to update your plugin with "grunt": ">=0.4.0" in it and publish that on npm.
Changes in 1.0.0
- Prevent async callback from being called multiple times. Pull #1464.
- Update copyright to jQuery Foundation and remove redundant headers. Fixes #1478.
- Update glob to 7.0.x. Fixes #1467.
- Removing duplicate BOM strip code. Pull #1482.
- Updated to latest cli ~1.2.0
- Ensure a grunt bin gets created upon install.
Changes in Grunt 1.0 RC1:
Be aware, some APIs have changed warranting a major version update:
coffee-scriptis upgraded to~1.10.0which could incur breaking changes when using the language with plugins and Gruntfiles.noptis upgraded to~3.0.6which has fixed many issues, including passing multiple arguments and dealing with numbers as options. Be aware previously--foo barused to pass the value'bar'to the optionfoo. It will now set the optionfoototrueand run the taskbar.globis upgraded to~6.0.4andminimatchis upgraded to~3.0.0. Results are now sorted by default withgrunt.file.expandMapping(). Pass thenosort: trueoption if you don't want the results to be sorted.lodashwas upgraded to~4.3.0. Many changes have occurred. Some of which that directly effect Grunt aregrunt.util._.template()returns a compile function andgrunt.util._.flattenno longer flattens deeply.grunt.util._is deprecated and we highly encourage you tonpm install lodashandvar _ = require('lodash')to uselodash. Please see the lodash changelog for a full list of changes: https://github.com/lodash/lodash/wiki/Changelogiconv-liteis upgraded to~0.4.13and strips the BOM by default.js-yamlis upgraded to~3.5.2and may affectgrunt.file.readYAML. We encourage you to pleasenpm install js-yamland usevar YAML = require('js-yaml')directly in case of future deprecations.- A file
modeoption can be passed into grunt.file.write(). Done, without errors.was changed toDone.to avoid failing by mistake on the worderrors.