{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2392","labels_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2392/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2392/comments","events_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2392/events","html_url":"https://github.com/mozilla/fxa-content-server/issues/2392","id":74181242,"number":2392,"title":"Investigate unused amd requires","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-08T01:01:21Z","updated_at":"2015-05-08T01:03:37Z","closed_at":null,"body":"Per @shane-tomlinson's https://github.com/mozilla/fxa-content-server/pull/2377#discussion_r29797070\r\n\r\n> _\"I don't think `p` is used anywhere in this module.\"_\r\n\r\n---\r\n\r\nI was playing w/ [**grunt-amdcheck**](https://www.npmjs.com/package/grunt-amdcheck) and noticed some interesting results (but lots of noise).\r\n\r\nHere is my _grunttasks/**amdcheck.js**_ file:\r\n\r\n```js\r\nmodule.exports = function (grunt) {\r\n  grunt.config('amdcheck', {\r\n    app: {\r\n      files: [{\r\n        expand: true,\r\n        cwd: 'app/',\r\n        src: [\r\n          '**/*.js',\r\n          '!bower_components/**'\r\n        ],\r\n        dest: 'build/'\r\n      }]\r\n    }\r\n  });\r\n}\r\n```\r\n\r\nAnd here is the difficult to read output:\r\n\r\n```\r\n$ grunt amdcheck --no-color | pbcopy\r\n\r\nRunning \"amdcheck:app\" (amdcheck) task\r\n\r\napp/scripts/head/boot.js (no module)\r\napp/scripts/head/start.js (no module)\r\napp/scripts/head/startup-styles.js (1 module)\r\nUnused paths: lib/environment\r\napp/scripts/lib/able.js (1 module)\r\napp/scripts/lib/app-start.js (1 module)\r\napp/scripts/lib/assertion.js (1 module)\r\napp/scripts/lib/auth-errors.js (1 module)\r\napp/scripts/lib/base64url.js (1 module)\r\napp/scripts/lib/channels/base.js (1 module)\r\napp/scripts/lib/channels/duplex.js (1 module)\r\napp/scripts/lib/channels/fx-desktop.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/scripts/lib/channels/iframe.js (1 module)\r\napp/scripts/lib/channels/inter-tab.js (1 module)\r\napp/scripts/lib/channels/mixins/postmessage_receiver.js (1 module)\r\napp/scripts/lib/channels/null.js (1 module)\r\napp/scripts/lib/channels/receivers/null.js (1 module)\r\napp/scripts/lib/channels/receivers/web-channel.js (1 module)\r\napp/scripts/lib/channels/senders/null.js (1 module)\r\napp/scripts/lib/channels/senders/web-channel.js (1 module)\r\napp/scripts/lib/channels/web.js (1 module)\r\napp/scripts/lib/config-loader.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/scripts/lib/constants.js (1 module)\r\napp/scripts/lib/cropper.js (1 module)\r\napp/scripts/lib/environment.js (1 module)\r\napp/scripts/lib/ephemeral-messages.js (1 module)\r\napp/scripts/lib/errors.js (1 module)\r\napp/scripts/lib/fxa-client.js (1 module)\r\nUnused paths: underscore, lib/xhr\r\n\r\napp/scripts/lib/hkdf.js (1 module)\r\napp/scripts/lib/image-loader.js (1 module)\r\napp/scripts/lib/mailcheck.js (1 module)\r\nUnused paths: mailcheck\r\napp/scripts/lib/metrics.js (1 module)\r\napp/scripts/lib/null-metrics.js (1 module)\r\napp/scripts/lib/null-storage.js (1 module)\r\napp/scripts/lib/oauth-client.js (1 module)\r\nUnused paths: lib/promise, lib/session\r\n\r\napp/scripts/lib/oauth-errors.js (1 module)\r\napp/scripts/lib/profile-client.js (1 module)\r\napp/scripts/lib/profile-errors.js (1 module)\r\napp/scripts/lib/promise.js (1 module)\r\napp/scripts/lib/relier-keys.js (1 module)\r\napp/scripts/lib/resume-token.js (1 module)\r\napp/scripts/lib/screen-info.js (1 module)\r\napp/scripts/lib/service-name.js (1 module)\r\napp/scripts/lib/session.js (1 module)\r\napp/scripts/lib/storage.js (1 module)\r\napp/scripts/lib/strings.js (1 module)\r\napp/scripts/lib/translator.js (1 module)\r\napp/scripts/lib/url.js (1 module)\r\napp/scripts/lib/validate.js (1 module)\r\napp/scripts/lib/xhr.js (1 module)\r\napp/scripts/lib/xss.js (1 module)\r\napp/scripts/main.js (no module)\r\napp/scripts/models/account.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/scripts/models/auth_brokers/base.js (1 module)\r\napp/scripts/models/auth_brokers/fx-desktop.js (1 module)\r\napp/scripts/models/auth_brokers/iframe.js (1 module)\r\nUnused paths: jquery, lib/promise, lib/channels/iframe, lib/auth-errors\r\n\r\napp/scripts/models/auth_brokers/mixins/channel.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/scripts/models/auth_brokers/oauth.js (1 module)\r\napp/scripts/models/auth_brokers/redirect.js (1 module)\r\napp/scripts/models/auth_brokers/web-channel.js (1 module)\r\napp/scripts/models/cropper-image.js (1 module)\r\napp/scripts/models/form-prefill.js (1 module)\r\napp/scripts/models/mixins/search-param.js (1 module)\r\napp/scripts/models/notifications.js (1 module)\r\napp/scripts/models/profile-image.js (1 module)\r\napp/scripts/models/reliers/base.js (1 module)\r\napp/scripts/models/reliers/fx-desktop.js (1 module)\r\napp/scripts/models/reliers/oauth.js (1 module)\r\nUnused paths: lib/promise\r\n\r\napp/scripts/models/reliers/relier.js (1 module)\r\napp/scripts/models/user.js (1 module)\r\nUnused paths: lib/assertion, lib/oauth-client\r\n\r\napp/scripts/models/verification/account-unlock.js (1 module)\r\napp/scripts/models/verification/base.js (1 module)\r\napp/scripts/models/verification/reset-password.js (1 module)\r\napp/scripts/models/verification/sign-up.js (1 module)\r\napp/scripts/processed/constants.js (1 module)\r\napp/scripts/require_config.js (no module)\r\napp/scripts/router.js (1 module)\r\napp/scripts/vendor/crosstab.js (3 modules)\r\napp/scripts/vendor/jwcrypto.js (1 module)\r\napp/scripts/vendor/jwcrypto/index.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/algs/ds.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/algs/index.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/algs/rs.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/assertion.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/cert.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/jwcrypto.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/rng.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/utils.js (1 module)\r\napp/scripts/vendor/jwcrypto/lib/version.js (1 module)\r\napp/scripts/vendor/jwcrypto/libs/all.js (1 module)\r\napp/scripts/vendor/jwcrypto/libs/minimal.js (1 module)\r\napp/scripts/vendor/jwcrypto__.js (1 module)\r\napp/scripts/views/base.js (1 module)\r\napp/scripts/views/cannot_create_account.js (1 module)\r\napp/scripts/views/change_password.js (1 module)\r\napp/scripts/views/clear_storage.js (1 module)\r\napp/scripts/views/close_button.js (1 module)\r\napp/scripts/views/complete_account_unlock.js (1 module)\r\napp/scripts/views/complete_reset_password.js (1 module)\r\nUnused paths: lib/validate\r\n\r\napp/scripts/views/complete_sign_up.js (1 module)\r\nUnused paths: lib/validate, lib/promise\r\n\r\napp/scripts/views/confirm.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/scripts/views/confirm_account_unlock.js (1 module)\r\napp/scripts/views/confirm_reset_password.js (1 module)\r\nUnused paths: jquery, lib/constants\r\n\r\napp/scripts/views/cookies_disabled.js (1 module)\r\napp/scripts/views/coppa/coppa-date-picker.js (1 module)\r\napp/scripts/views/decorators/allow_only_one_submit.js (1 module)\r\napp/scripts/views/decorators/notify_delayed_request.js (1 module)\r\napp/scripts/views/decorators/progress_indicator.js (1 module)\r\napp/scripts/views/delete_account.js (1 module)\r\napp/scripts/views/force_auth.js (1 module)\r\napp/scripts/views/form.js (1 module)\r\napp/scripts/views/legal.js (1 module)\r\napp/scripts/views/legal_copy.js (1 module)\r\napp/scripts/views/marketing_snippet.js (1 module)\r\napp/scripts/views/marketing_snippet_ios.js (1 module)\r\nUnused paths: lib/constants\r\n\r\napp/scripts/views/mixins/account-locked-mixin.js (1 module)\r\napp/scripts/views/mixins/avatar-mixin.js (1 module)\r\napp/scripts/views/mixins/back-mixin.js (1 module)\r\napp/scripts/views/mixins/floating-placeholder-mixin.js (1 module)\r\napp/scripts/views/mixins/password-mixin.js (1 module)\r\napp/scripts/views/mixins/resend-mixin.js (1 module)\r\napp/scripts/views/mixins/service-mixin.js (1 module)\r\napp/scripts/views/mixins/settings-mixin.js (1 module)\r\napp/scripts/views/mixins/timer-mixin.js (1 module)\r\napp/scripts/views/pp.js (1 module)\r\napp/scripts/views/progress_indicator.js (1 module)\r\napp/scripts/views/ready.js (1 module)\r\nUnused paths: lib/session, lib/xss, lib/strings, lib/auth-errors, lib/promise\r\n\r\napp/scripts/views/reset_password.js (1 module)\r\napp/scripts/views/settings.js (1 module)\r\napp/scripts/views/settings/avatar.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/scripts/views/settings/avatar_camera.js (1 module)\r\nUnused paths: canvasToBlob\r\n\r\napp/scripts/views/settings/avatar_change.js (1 module)\r\nUnused paths: underscore, lib/url\r\n\r\napp/scripts/views/settings/avatar_crop.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/scripts/views/settings/avatar_gravatar.js (1 module)\r\napp/scripts/views/sign_in.js (1 module)\r\nUnused paths: lib/validate\r\n\r\napp/scripts/views/sign_up.js (1 module)\r\nUnused paths: lib/session, lib/strings\r\n\r\napp/scripts/views/tooltip.js (1 module)\r\napp/scripts/views/tos.js (1 module)\r\napp/scripts/views/unexpected_error.js (1 module)\r\napp/tests/lib/blanket_lcov.js (no module)\r\napp/tests/lib/helpers.js (1 module)\r\napp/tests/main.js (no module)\r\napp/tests/mocks/canvas.js (1 module)\r\napp/tests/mocks/crosstab.js (1 module)\r\napp/tests/mocks/dom-event.js (1 module)\r\napp/tests/mocks/file-reader.js (1 module)\r\napp/tests/mocks/fxa-client.js (1 module)\r\napp/tests/mocks/history.js (1 module)\r\napp/tests/mocks/oauth_servers.js (1 module)\r\napp/tests/mocks/profile.js (1 module)\r\napp/tests/mocks/router.js (1 module)\r\napp/tests/mocks/window.js (1 module)\r\napp/tests/setup.js (1 module)\r\napp/tests/spec/head/startup-styles.js (1 module)\r\napp/tests/spec/lib/able.js (1 module)\r\napp/tests/spec/lib/app-start.js (1 module)\r\nUnused paths: models/reliers/base\r\n\r\napp/tests/spec/lib/assertion.js (1 module)\r\nUnused paths: sinon, lib/constants, vendor/jwcrypto/lib/algs/rs\r\n\r\napp/tests/spec/lib/auth-errors.js (1 module)\r\napp/tests/spec/lib/base64url.js (1 module)\r\napp/tests/spec/lib/channels/duplex.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/tests/spec/lib/channels/fx-desktop.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/tests/spec/lib/channels/iframe.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/tests/spec/lib/channels/inter-tab.js (1 module)\r\napp/tests/spec/lib/channels/null.js (1 module)\r\nUnused paths: chai\r\n\r\napp/tests/spec/lib/channels/receivers/web-channel.js (1 module)\r\napp/tests/spec/lib/channels/senders/web-channel.js (1 module)\r\napp/tests/spec/lib/channels/web.js (1 module)\r\nUnused paths: router, views/sign_in\r\n\r\napp/tests/spec/lib/cropper.js (1 module)\r\nUnused paths: jquery\r\n\r\napp/tests/spec/lib/environment.js (1 module)\r\napp/tests/spec/lib/fxa-client.js (1 module)\r\nUnused paths: lib/session\r\n\r\napp/tests/spec/lib/image-loader.js (1 module)\r\napp/tests/spec/lib/mailcheck.js (1 module)\r\nUnused paths: lib/promise\r\n\r\napp/tests/spec/lib/metrics.js (1 module)\r\napp/tests/spec/lib/null-metrics.js (1 module)\r\napp/tests/spec/lib/null-storage.js (1 module)\r\napp/tests/spec/lib/oauth-client.js (1 module)\r\nUnused paths: jquery, ../../lib/helpers\r\n\r\napp/tests/spec/lib/oauth-errors.js (1 module)\r\napp/tests/spec/lib/profile-client.js (1 module)\r\nUnused paths: jquery\r\n\r\napp/tests/spec/lib/relier-keys.js (1 module)\r\napp/tests/spec/lib/resume-token.js (1 module)\r\napp/tests/spec/lib/router.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/lib/screen-info.js (1 module)\r\napp/tests/spec/lib/service-name.js (1 module)\r\napp/tests/spec/lib/session.js (1 module)\r\napp/tests/spec/lib/storage.js (1 module)\r\napp/tests/spec/lib/strings.js (1 module)\r\napp/tests/spec/lib/translator.js (1 module)\r\napp/tests/spec/lib/url.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/lib/validate.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/lib/xhr.js (1 module)\r\napp/tests/spec/lib/xss.js (1 module)\r\napp/tests/spec/models/account.js (1 module)\r\napp/tests/spec/models/auth_brokers/base.js (1 module)\r\nUnused paths: sinon\r\n\r\napp/tests/spec/models/auth_brokers/fx-desktop.js (1 module)\r\nUnused paths: underscore, lib/constants\r\n\r\napp/tests/spec/models/auth_brokers/iframe.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/tests/spec/models/auth_brokers/oauth.js (1 module)\r\napp/tests/spec/models/auth_brokers/redirect.js (1 module)\r\napp/tests/spec/models/auth_brokers/web-channel.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/tests/spec/models/form-prefill.js (1 module)\r\napp/tests/spec/models/notifications.js (1 module)\r\nUnused paths: lib/promise\r\n\r\napp/tests/spec/models/profile-image.js (1 module)\r\nUnused paths: sinon, lib/promise\r\n\r\napp/tests/spec/models/reliers/base.js (1 module)\r\napp/tests/spec/models/reliers/fx-desktop.js (1 module)\r\napp/tests/spec/models/reliers/oauth.js (1 module)\r\napp/tests/spec/models/reliers/relier.js (1 module)\r\napp/tests/spec/models/user.js (1 module)\r\napp/tests/spec/models/verification/base.js (1 module)\r\nUnused paths: sinon\r\n\r\napp/tests/spec/models/verification/reset-password.js (1 module)\r\nUnused paths: sinon\r\n\r\napp/tests/spec/models/verification/sign-up.js (1 module)\r\nUnused paths: sinon\r\n\r\napp/tests/spec/views/base.js (1 module)\r\napp/tests/spec/views/cannot_create_account.js (1 module)\r\napp/tests/spec/views/change_password.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/views/clear_storage.js (1 module)\r\napp/tests/spec/views/close_button.js (1 module)\r\napp/tests/spec/views/complete_account_unlock.js (1 module)\r\napp/tests/spec/views/complete_reset_password.js (1 module)\r\napp/tests/spec/views/complete_sign_up.js (1 module)\r\napp/tests/spec/views/confirm.js (1 module)\r\napp/tests/spec/views/confirm_account_unlock.js (1 module)\r\napp/tests/spec/views/confirm_reset_password.js (1 module)\r\nUnused paths: lib/session\r\n\r\napp/tests/spec/views/cookies_disabled.js (1 module)\r\nUnused paths: lib/promise\r\n\r\napp/tests/spec/views/coppa/coppa-date-picker.js (1 module)\r\nUnused paths: underscore, lib/auth-errors, lib/promise\r\n\r\napp/tests/spec/views/delete_account.js (1 module)\r\napp/tests/spec/views/force_auth.js (1 module)\r\nUnused paths: lib/session\r\n\r\napp/tests/spec/views/form.js (1 module)\r\napp/tests/spec/views/marketing_snippet.js (1 module)\r\napp/tests/spec/views/marketing_snippet_ios.js (1 module)\r\napp/tests/spec/views/mixins/account-locked-mixin.js (1 module)\r\napp/tests/spec/views/mixins/avatar-mixin.js (1 module)\r\nUnused paths: backbone\r\n\r\napp/tests/spec/views/mixins/back-mixin.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/views/mixins/floating-placeholder-mixin.js (1 module)\r\napp/tests/spec/views/mixins/password-mixin.js (1 module)\r\nUnused paths: backbone\r\n\r\napp/tests/spec/views/mixins/service-mixin.js (1 module)\r\napp/tests/spec/views/mixins/timer-mixin.js (1 module)\r\nUnused paths: backbone\r\n\r\napp/tests/spec/views/oauth_sign_in.js (1 module)\r\napp/tests/spec/views/oauth_sign_up.js (1 module)\r\nUnused paths: lib/auth-errors\r\n\r\napp/tests/spec/views/pp.js (1 module)\r\napp/tests/spec/views/progress_indicator.js (1 module)\r\napp/tests/spec/views/ready.js (1 module)\r\nUnused paths: lib/promise\r\n\r\napp/tests/spec/views/reset_password.js (1 module)\r\nUnused paths: lib/session\r\n\r\napp/tests/spec/views/settings.js (1 module)\r\nUnused paths: underscore, lib/constants\r\n\r\napp/tests/spec/views/settings/avatar.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/views/settings/avatar_camera.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/views/settings/avatar_change.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/views/settings/avatar_crop.js (1 module)\r\nUnused paths: underscore, draggable, lib/constants\r\n\r\napp/tests/spec/views/settings/avatar_gravatar.js (1 module)\r\nUnused paths: underscore\r\n\r\napp/tests/spec/views/sign_in.js (1 module)\r\napp/tests/spec/views/sign_up.js (1 module)\r\nUnused paths: underscore, moment\r\n\r\napp/tests/spec/views/tooltip.js (1 module)\r\napp/tests/spec/views/tos.js (1 module)\r\napp/tests/spec/views/unexpected_error.js (1 module)\r\napp/tests/test_start.js (no module)\r\n\r\nTotal unused dependencies: 89 in 64 files.\r\nTotal processed files: 251\r\n\r\nDone, without errors.\r\n```"},"comment":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/comments/100058025","html_url":"https://github.com/mozilla/fxa-content-server/issues/2392#issuecomment-100058025","issue_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2392","id":100058025,"user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T01:03:37Z","updated_at":"2015-05-08T01:03:37Z","body":"I only spot checked a few, but most seemed to make sense at quick glance.\r\n\r\nFor example:\r\n\r\n> [**app/scripts/lib/channels/fx-desktop.js** (1 module)](https://github.com/mozilla/fxa-content-server/blob/a80b86e53d1695723024b091eb5f87d25cc5618c/app/scripts/lib/channels/fx-desktop.js#L14)\r\n> Unused paths lib/auth-errors\r\n\r\nDoing a quick Ctrl+F on that page for \"AuthErrors\" shows that we aren't using that variable.\r\n\r\n**¯\\\\\\_(ツ)_/¯**\r\n"}}