{"action":"created","comment":{"url":"https://api.github.com/repos/gruntjs/grunt/pulls/comments/167467735","pull_request_review_id":95688914,"id":167467735,"diff_hunk":"@@ -0,0 +1,116 @@\n+var grunt = require('../grunt');\n+\n+function deprecate(obj, property, message) {\n+  if (Array.isArray(obj)) {\n+    obj.forEach(function(item) {\n+      deprecate(item.obj, item.property, item.message);\n+    });\n+    return;\n+  }\n+  var logged = false;\n+  function warn() {\n+    var hideDeprecation = grunt.option('hide-deprecations');\n+    if (!hideDeprecation && !logged) {\n+      if (grunt.option('stack')) {\n+        grunt.log.warn(Error(message).stack);\n+      } else {\n+        grunt.log.warn(message);\n+      }\n+      logged = true;\n+    }\n+  }\n+  var orig = obj[property];\n+  Object.defineProperty(obj, property, {\n+    enumerable: true,\n+    configurable: true,\n+    set: function(val) {\n+      warn();\n+      orig = val;\n+    },\n+    get: function() {\n+      warn();\n+      return orig;\n+    }\n+  });\n+}\n+module.exports = deprecate;\n+\n+deprecate([","path":"lib/grunt/deprecate.js","position":38,"original_position":38,"commit_id":"d14e96be43258a4c041efae01be232e08c67b980","original_commit_id":"d14e96be43258a4c041efae01be232e08c67b980","user":{"login":"cowboy","id":54051,"avatar_url":"https://avatars0.githubusercontent.com/u/54051?v=4","gravatar_id":"","url":"https://api.github.com/users/cowboy","html_url":"https://github.com/cowboy","followers_url":"https://api.github.com/users/cowboy/followers","following_url":"https://api.github.com/users/cowboy/following{/other_user}","gists_url":"https://api.github.com/users/cowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/cowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowboy/subscriptions","organizations_url":"https://api.github.com/users/cowboy/orgs","repos_url":"https://api.github.com/users/cowboy/repos","events_url":"https://api.github.com/users/cowboy/events{/privacy}","received_events_url":"https://api.github.com/users/cowboy/received_events","type":"User","site_admin":false},"body":"It might make sense to call `deprecate` in a different file than where it's defined... but perhaps I'm overthinking things!","created_at":"2018-02-12T04:28:18Z","updated_at":"2018-02-12T04:28:18Z","html_url":"https://github.com/gruntjs/grunt/pull/1625#discussion_r167467735","pull_request_url":"https://api.github.com/repos/gruntjs/grunt/pulls/1625","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/gruntjs/grunt/pulls/comments/167467735"},"html":{"href":"https://github.com/gruntjs/grunt/pull/1625#discussion_r167467735"},"pull_request":{"href":"https://api.github.com/repos/gruntjs/grunt/pulls/1625"}}},"pull_request":{"url":"https://api.github.com/repos/gruntjs/grunt/pulls/1625","id":168490966,"html_url":"https://github.com/gruntjs/grunt/pull/1625","diff_url":"https://github.com/gruntjs/grunt/pull/1625.diff","patch_url":"https://github.com/gruntjs/grunt/pull/1625.patch","issue_url":"https://api.github.com/repos/gruntjs/grunt/issues/1625","number":1625,"state":"open","locked":false,"title":"Implement deprecate API and deprecate APIs","user":{"login":"shama","id":99604,"avatar_url":"https://avatars0.githubusercontent.com/u/99604?v=4","gravatar_id":"","url":"https://api.github.com/users/shama","html_url":"https://github.com/shama","followers_url":"https://api.github.com/users/shama/followers","following_url":"https://api.github.com/users/shama/following{/other_user}","gists_url":"https://api.github.com/users/shama/gists{/gist_id}","starred_url":"https://api.github.com/users/shama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shama/subscriptions","organizations_url":"https://api.github.com/users/shama/orgs","repos_url":"https://api.github.com/users/shama/repos","events_url":"https://api.github.com/users/shama/events{/privacy}","received_events_url":"https://api.github.com/users/shama/received_events","type":"User","site_admin":false},"body":"Ref: https://github.com/gruntjs/rfcs/pull/1\r\n\r\nThis implements an **internal** deprecations API that displays a warning in the console if one of the deprecated APIs are used.\r\n\r\nTo hide deprecation warnings, use `--hide-deprecations` on the CLI or `grunt.option('hide-deprecations', true)` in your Gruntfile.\r\n\r\nWhen `--stack` or `grunt.option('stack', true)` is enabled, the deprecation warnings will print stack traces out to locate the deprecated APIs.\r\n\r\n---\r\n\r\nThe following APIs will be publicly deprecated: \r\n\r\n* All functions on `grunt.util._`\r\n* All functions on `grunt.util.async`\r\n* All functions on `grunt.util.namespace`\r\n* All functions on `grunt.util.hooker`\r\n* `grunt.util.exit`\r\n* `grunt.util.toArray`\r\n* `grunt.util.repeat`\r\n* All functions on `grunt.file.glob`\r\n* All functions on `grunt.file.minimatch`\r\n* All functions on `grunt.file.findup`\r\n* `grunt.file.readYAML`\r\n* `grunt.file.readJSON`\r\n* All functions on `grunt.event`\r\n\r\nThe following APIs should be considered for deprecation although there isn't simple alternatives to point people to at this time (help?):\r\n\r\n* `grunt.util.spawn`\r\n* `grunt.util.callbackify`\r\n* `grunt.util.kindOf`\r\n* `grunt.util.pluralize`\r\n* `grunt.util.recurse`\r\n\r\n---\r\n\r\nInternally Grunt still uses these deprecated APIs. We should address those deprecation warning internally first too.\r\n\r\n---\r\n\r\nThis can be released on next minor release as it is backwards compatible but only adds a new behavior. Removing the deprecated APIs will happen on the next major release.","created_at":"2018-02-12T02:37:17Z","updated_at":"2018-02-12T04:28:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7aad4eed4ec5a7da9902567da11dc0236f0e177","assignee":null,"assignees":[],"requested_reviewers":[{"login":"vladikoff","id":128755,"avatar_url":"https://avatars3.githubusercontent.com/u/128755?v=4","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gruntjs/grunt/pulls/1625/commits","review_comments_url":"https://api.github.com/repos/gruntjs/grunt/pulls/1625/comments","review_comment_url":"https://api.github.com/repos/gruntjs/grunt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gruntjs/grunt/issues/1625/comments","statuses_url":"https://api.github.com/repos/gruntjs/grunt/statuses/d14e96be43258a4c041efae01be232e08c67b980","head":{"label":"gruntjs:deprecate","ref":"deprecate","sha":"d14e96be43258a4c041efae01be232e08c67b980","user":{"login":"gruntjs","id":1630826,"avatar_url":"https://avatars1.githubusercontent.com/u/1630826?v=4","gravatar_id":"","url":"https://api.github.com/users/gruntjs","html_url":"https://github.com/gruntjs","followers_url":"https://api.github.com/users/gruntjs/followers","following_url":"https://api.github.com/users/gruntjs/following{/other_user}","gists_url":"https://api.github.com/users/gruntjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntjs/subscriptions","organizations_url":"https://api.github.com/users/gruntjs/orgs","repos_url":"https://api.github.com/users/gruntjs/repos","events_url":"https://api.github.com/users/gruntjs/events{/privacy}","received_events_url":"https://api.github.com/users/gruntjs/received_events","type":"Organization","site_admin":false},"repo":{"id":2430537,"name":"grunt","full_name":"gruntjs/grunt","owner":{"login":"gruntjs","id":1630826,"avatar_url":"https://avatars1.githubusercontent.com/u/1630826?v=4","gravatar_id":"","url":"https://api.github.com/users/gruntjs","html_url":"https://github.com/gruntjs","followers_url":"https://api.github.com/users/gruntjs/followers","following_url":"https://api.github.com/users/gruntjs/following{/other_user}","gists_url":"https://api.github.com/users/gruntjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntjs/subscriptions","organizations_url":"https://api.github.com/users/gruntjs/orgs","repos_url":"https://api.github.com/users/gruntjs/repos","events_url":"https://api.github.com/users/gruntjs/events{/privacy}","received_events_url":"https://api.github.com/users/gruntjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gruntjs/grunt","description":"Grunt: The JavaScript Task Runner","fork":false,"url":"https://api.github.com/repos/gruntjs/grunt","forks_url":"https://api.github.com/repos/gruntjs/grunt/forks","keys_url":"https://api.github.com/repos/gruntjs/grunt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gruntjs/grunt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gruntjs/grunt/teams","hooks_url":"https://api.github.com/repos/gruntjs/grunt/hooks","issue_events_url":"https://api.github.com/repos/gruntjs/grunt/issues/events{/number}","events_url":"https://api.github.com/repos/gruntjs/grunt/events","assignees_url":"https://api.github.com/repos/gruntjs/grunt/assignees{/user}","branches_url":"https://api.github.com/repos/gruntjs/grunt/branches{/branch}","tags_url":"https://api.github.com/repos/gruntjs/grunt/tags","blobs_url":"https://api.github.com/repos/gruntjs/grunt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gruntjs/grunt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gruntjs/grunt/git/refs{/sha}","trees_url":"https://api.github.com/repos/gruntjs/grunt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gruntjs/grunt/statuses/{sha}","languages_url":"https://api.github.com/repos/gruntjs/grunt/languages","stargazers_url":"https://api.github.com/repos/gruntjs/grunt/stargazers","contributors_url":"https://api.github.com/repos/gruntjs/grunt/contributors","subscribers_url":"https://api.github.com/repos/gruntjs/grunt/subscribers","subscription_url":"https://api.github.com/repos/gruntjs/grunt/subscription","commits_url":"https://api.github.com/repos/gruntjs/grunt/commits{/sha}","git_commits_url":"https://api.github.com/repos/gruntjs/grunt/git/commits{/sha}","comments_url":"https://api.github.com/repos/gruntjs/grunt/comments{/number}","issue_comment_url":"https://api.github.com/repos/gruntjs/grunt/issues/comments{/number}","contents_url":"https://api.github.com/repos/gruntjs/grunt/contents/{+path}","compare_url":"https://api.github.com/repos/gruntjs/grunt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gruntjs/grunt/merges","archive_url":"https://api.github.com/repos/gruntjs/grunt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gruntjs/grunt/downloads","issues_url":"https://api.github.com/repos/gruntjs/grunt/issues{/number}","pulls_url":"https://api.github.com/repos/gruntjs/grunt/pulls{/number}","milestones_url":"https://api.github.com/repos/gruntjs/grunt/milestones{/number}","notifications_url":"https://api.github.com/repos/gruntjs/grunt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gruntjs/grunt/labels{/name}","releases_url":"https://api.github.com/repos/gruntjs/grunt/releases{/id}","deployments_url":"https://api.github.com/repos/gruntjs/grunt/deployments","created_at":"2011-09-21T15:16:20Z","updated_at":"2018-02-10T14:14:43Z","pushed_at":"2018-02-12T02:40:40Z","git_url":"git://github.com/gruntjs/grunt.git","ssh_url":"git@github.com:gruntjs/grunt.git","clone_url":"https://github.com/gruntjs/grunt.git","svn_url":"https://github.com/gruntjs/grunt","homepage":"http://gruntjs.com/","size":2662,"stargazers_count":11724,"watchers_count":11724,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1538,"mirror_url":null,"archived":false,"open_issues_count":140,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1538,"open_issues":140,"watchers":11724,"default_branch":"master"}},"base":{"label":"gruntjs:master","ref":"master","sha":"d9691320e4333fb07d9dd3940ccbc9e5337692e0","user":{"login":"gruntjs","id":1630826,"avatar_url":"https://avatars1.githubusercontent.com/u/1630826?v=4","gravatar_id":"","url":"https://api.github.com/users/gruntjs","html_url":"https://github.com/gruntjs","followers_url":"https://api.github.com/users/gruntjs/followers","following_url":"https://api.github.com/users/gruntjs/following{/other_user}","gists_url":"https://api.github.com/users/gruntjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntjs/subscriptions","organizations_url":"https://api.github.com/users/gruntjs/orgs","repos_url":"https://api.github.com/users/gruntjs/repos","events_url":"https://api.github.com/users/gruntjs/events{/privacy}","received_events_url":"https://api.github.com/users/gruntjs/received_events","type":"Organization","site_admin":false},"repo":{"id":2430537,"name":"grunt","full_name":"gruntjs/grunt","owner":{"login":"gruntjs","id":1630826,"avatar_url":"https://avatars1.githubusercontent.com/u/1630826?v=4","gravatar_id":"","url":"https://api.github.com/users/gruntjs","html_url":"https://github.com/gruntjs","followers_url":"https://api.github.com/users/gruntjs/followers","following_url":"https://api.github.com/users/gruntjs/following{/other_user}","gists_url":"https://api.github.com/users/gruntjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntjs/subscriptions","organizations_url":"https://api.github.com/users/gruntjs/orgs","repos_url":"https://api.github.com/users/gruntjs/repos","events_url":"https://api.github.com/users/gruntjs/events{/privacy}","received_events_url":"https://api.github.com/users/gruntjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gruntjs/grunt","description":"Grunt: The JavaScript Task Runner","fork":false,"url":"https://api.github.com/repos/gruntjs/grunt","forks_url":"https://api.github.com/repos/gruntjs/grunt/forks","keys_url":"https://api.github.com/repos/gruntjs/grunt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gruntjs/grunt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gruntjs/grunt/teams","hooks_url":"https://api.github.com/repos/gruntjs/grunt/hooks","issue_events_url":"https://api.github.com/repos/gruntjs/grunt/issues/events{/number}","events_url":"https://api.github.com/repos/gruntjs/grunt/events","assignees_url":"https://api.github.com/repos/gruntjs/grunt/assignees{/user}","branches_url":"https://api.github.com/repos/gruntjs/grunt/branches{/branch}","tags_url":"https://api.github.com/repos/gruntjs/grunt/tags","blobs_url":"https://api.github.com/repos/gruntjs/grunt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gruntjs/grunt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gruntjs/grunt/git/refs{/sha}","trees_url":"https://api.github.com/repos/gruntjs/grunt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gruntjs/grunt/statuses/{sha}","languages_url":"https://api.github.com/repos/gruntjs/grunt/languages","stargazers_url":"https://api.github.com/repos/gruntjs/grunt/stargazers","contributors_url":"https://api.github.com/repos/gruntjs/grunt/contributors","subscribers_url":"https://api.github.com/repos/gruntjs/grunt/subscribers","subscription_url":"https://api.github.com/repos/gruntjs/grunt/subscription","commits_url":"https://api.github.com/repos/gruntjs/grunt/commits{/sha}","git_commits_url":"https://api.github.com/repos/gruntjs/grunt/git/commits{/sha}","comments_url":"https://api.github.com/repos/gruntjs/grunt/comments{/number}","issue_comment_url":"https://api.github.com/repos/gruntjs/grunt/issues/comments{/number}","contents_url":"https://api.github.com/repos/gruntjs/grunt/contents/{+path}","compare_url":"https://api.github.com/repos/gruntjs/grunt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gruntjs/grunt/merges","archive_url":"https://api.github.com/repos/gruntjs/grunt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gruntjs/grunt/downloads","issues_url":"https://api.github.com/repos/gruntjs/grunt/issues{/number}","pulls_url":"https://api.github.com/repos/gruntjs/grunt/pulls{/number}","milestones_url":"https://api.github.com/repos/gruntjs/grunt/milestones{/number}","notifications_url":"https://api.github.com/repos/gruntjs/grunt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gruntjs/grunt/labels{/name}","releases_url":"https://api.github.com/repos/gruntjs/grunt/releases{/id}","deployments_url":"https://api.github.com/repos/gruntjs/grunt/deployments","created_at":"2011-09-21T15:16:20Z","updated_at":"2018-02-10T14:14:43Z","pushed_at":"2018-02-12T02:40:40Z","git_url":"git://github.com/gruntjs/grunt.git","ssh_url":"git@github.com:gruntjs/grunt.git","clone_url":"https://github.com/gruntjs/grunt.git","svn_url":"https://github.com/gruntjs/grunt","homepage":"http://gruntjs.com/","size":2662,"stargazers_count":11724,"watchers_count":11724,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1538,"mirror_url":null,"archived":false,"open_issues_count":140,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1538,"open_issues":140,"watchers":11724,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gruntjs/grunt/pulls/1625"},"html":{"href":"https://github.com/gruntjs/grunt/pull/1625"},"issue":{"href":"https://api.github.com/repos/gruntjs/grunt/issues/1625"},"comments":{"href":"https://api.github.com/repos/gruntjs/grunt/issues/1625/comments"},"review_comments":{"href":"https://api.github.com/repos/gruntjs/grunt/pulls/1625/comments"},"review_comment":{"href":"https://api.github.com/repos/gruntjs/grunt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gruntjs/grunt/pulls/1625/commits"},"statuses":{"href":"https://api.github.com/repos/gruntjs/grunt/statuses/d14e96be43258a4c041efae01be232e08c67b980"}},"author_association":"OWNER"}}
{"actor":{"display_login":"cowboy"}}