{"id":15698996,"url":"https://github.com/pgilad/grunt-dev-update","last_synced_at":"2025-04-30T13:53:29.273Z","repository":{"id":11721997,"uuid":"14243460","full_name":"pgilad/grunt-dev-update","owner":"pgilad","description":"Automate the updating of your package.json packages with a grunt task","archived":false,"fork":false,"pushed_at":"2020-02-28T20:50:12.000Z","size":111,"stargazers_count":29,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T16:46:31.989Z","etag":null,"topics":["grunt-task","javascript","npm","outdated-packages","update"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgilad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-08T20:21:32.000Z","updated_at":"2020-01-28T16:09:58.000Z","dependencies_parsed_at":"2022-09-09T06:00:48.036Z","dependency_job_id":null,"html_url":"https://github.com/pgilad/grunt-dev-update","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fgrunt-dev-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fgrunt-dev-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fgrunt-dev-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fgrunt-dev-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgilad","download_url":"https://codeload.github.com/pgilad/grunt-dev-update/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251309210,"owners_count":21568770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grunt-task","javascript","npm","outdated-packages","update"],"created_at":"2024-10-03T19:37:18.128Z","updated_at":"2025-04-30T13:53:29.230Z","avatar_url":"https://github.com/pgilad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [grunt](http://gruntjs.com/)-dev-update\n\u003e Update your devDependencies and dependencies automatically with a grunt task\n\n[![NPM Version](http://img.shields.io/npm/v/grunt-dev-update.svg?style=flat)](https://npmjs.org/package/grunt-dev-update)\n[![NPM Downloads](http://img.shields.io/npm/dm/grunt-dev-update.svg?style=flat)](https://npmjs.org/package/grunt-dev-update)\n[![Built with Grunt](http://img.shields.io/badge/BUILT_WITH-GRUNT-orange.svg?style=flat)](http://gruntjs.com/)\n\n## Getting Started\nThis plugin requires Grunt.\n\nIf you haven't used [Grunt](http://gruntjs.com/) before,\nbe sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide,\nas it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins.\nOnce you're familiar with that process, you may install this plugin with this command:\n\n```bash\nnpm install --save-dev grunt-dev-update\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-dev-update');\n```\n\nThe best way to load tasks is probably using [load-grunt-tasks](https://github.com/sindresorhus/load-grunt-tasks)\n\n```bash\nnpm install --save-dev load-grunt-tasks\n```\n\nAnd then add to your gruntfile.js:\n```js\nrequire('load-grunt-tasks')(grunt);\n```\n\n## The \"devUpdate\" task\n\n#### This plugin allows you to both update your dependencies and devDependencies with an automated task.\n\n1. See outdated packages\n2. Choose whether to just get notified, update them with a prompt, or automatically update them.\n3. Determine whether to stay with semver rules when updating, or to update to latest version.\n4. Update either or both your devDependencies and dependencies\n\n*Q: Why not use `npm update` or `npm install`?*\n\n**A: First, npm update doesn't work on dev dependencies. Second, npm update stays inside your semver matching in your package.json,\nthirdly - npm isn't automated like your grunt tasks.**\n\n### Overview\nIn your project's Gruntfile, add a task config named `devUpdate` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n    devUpdate: {\n        main: {\n            options: {\n                //task options go here\n            }\n        }\n    }\n})\n```\n\n### Options\n\n#### options.reportUpdated\nType: `Boolean`\nDefault value: `false`\n\nWhether to report an already updated package\n\n#### options.updateType\nType: `String`\nDefault value: `report`\n\nHow devUpdate should handle the outdated packages. Valid options:\n\n* `report` - Just report that the package is outdated.\n* `prompt` - Prompt user to confirm update of every package\n* `force` - Automatically force the update for the outdated packages.\n* `fail` - Fail task if an outdated package was found.\n\n#### options.packages\nType: `Object`\nDefault value: `{devDependencies: true}`\n\nWhat kind of packages should be checked. Valid options:\n\n* `dependencies` - Specify true to check **production dependencies**.\n\n    \u003e Outdated **dependencies** are installed using the `--save` option.\n\n* `devDependencies` - Specify true to check **development dependencies**. This is **true** by default.\n\n    \u003e Outdated **devDependencies** are installed using the `--save-dev` option.\n\n#### options.semver\nType: `Boolean`\nDefault value: `true`\n\n`true` - Packages will be updated with `npm update` and will be installed up to your allowed version in\nyour `package.json`. Your allowed version is determined using [semver](http://semver.org).\n\n`false` - Packages will be updated to the latest version there is, regardless of your `package.json` specifications.\n\n**Warning** - this could break packages and only use this option if you're sure of what you're doing.\n\n#### options.packageJson\nType: `null|Object|String`\nDefault value: `null`\n\nThis option allow you to manually configure the path of your **package.json**. Valid options:\n\n* `null` - This will use `matchdep` own logic for finding your package.json (using `findup` to find\nnearest package.json). This is the recommended and default option.\n* `String` - specify a relative path from your **process.cwd()** to find your package.json.\n* `Object` - pass in an object representing your package.json\n\nFor better understanding the `String` and `Object` option, please see [matchdep config](https://github.com/tkellen/node-matchdep#config).\n\n#### options.reportOnlyPkgs\nType: `Array`\nDefault value: `[]`\n\nSpecify packages that will be checked for newer version but only reported if outdated.\n\nThis is useful if you are aware of packages that will be outdated, but don't want to update them.\n\n### Usage Examples\n\n#### Default Options\nExample usage with all options specified with defaults:\n\n```js\ngrunt.initConfig({\n    devUpdate: {\n        main: {\n            options: {\n                updateType: 'report', //just report outdated packages\n                reportUpdated: false, //don't report up-to-date packages\n                semver: true, //stay within semver when updating\n                packages: {\n                    devDependencies: true, //only check for devDependencies\n                    dependencies: false\n                },\n                packageJson: null, //use matchdep default findup to locate package.json\n                reportOnlyPkgs: [] //use updateType action on all packages\n            }\n        }\n    }\n})\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## License\n\nMIT © [Gilad Peleg](https://www.giladpeleg.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Fgrunt-dev-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgilad%2Fgrunt-dev-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Fgrunt-dev-update/lists"}