Javascript will not load for anonymous users I have a controller with a route that has some javascript attached to it as a library.  When logged in as any user (admin or standard) the JS loads just fine.  When anonymous, the library file is loaded, but Drupal JS is not.
How the library is defined:
my_javascript:
  version: 1.x
  js:
    js/my_javascript.js: {}
  dependencies:
    - core/jquery

In the console the error says:

ReferenceError: Drupal is not defined
&lt; anonymous &gt;                      http://example.com/themes/custom/my_theme/js/my_javascript.js:7:3
&lt; anonymous &gt;                      http://example.com/themes/custom/my_theme/js/my_javascript.js:6:2

The lines in the JS the error is referring to are:
(function ($) {
  Drupal.behaviors.myScripts = {

This is the case for all browsers.  JS works fine when logged in as any user, but when anonymous, Drupal's JS does not load.
The code in the question appears to be similar to what was done in Drupal 7. In Drupal 8, the dependencies for your javascript need to be explicitly defined and it is a good idea to pass them through the closure as well. You can read more about the Javascript API in Drupal 8 on the new documentation pages.

my_javascript:
  version: 1.x
  js:
    js/my_javascript.js: {}
  dependencies:
    - core/jquery
    - core/drupal



(function ($, Drupal) {
  Drupal.behaviors.myScripts = {};
)(jQuery, Drupal);