Commit Graph

20 Commits

Author SHA1 Message Date
Joey Parrish f539147d48 fix: Correct license headers in compiled output
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.

It seems that the `!` in the header forces the compiler to keep it in
the output.  I believe older compiler releases did this purely based
on `@license`.

Issue #2638

Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
2020-06-09 16:05:09 -07:00
Joey Parrish 64896d70b0 Use shorter license header
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.

This also updates the company name from "Google, Inc" to "Google LLC".

Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
2019-11-22 18:18:36 +00:00
Jacob Trimble 260e485cbe Use bind() with console methods.
We avoided bind() since we could use lambdas instead; but with the
console methods, we loose the link to where the log happened in the
DevTools.  So by using bind(), we can see where the log came from.

Change-Id: I04ad1f360e459c3676eabb6d0651a7963d186b43
2019-10-01 17:47:36 +00:00
Joey Parrish 0b2b8e3f02 Eliminate goog.define
Changes in the Closure Compiler have made it so that goog.define
without using and assigning the return value will no longer be
allowed.  There is no need for goog.define, though.  Instead, we can
just use the @define annotation and assign directly to a variable.
This eliminates the use of goog.define.

A similar change was already made almost two years ago for the Player
version in lib/player.js
(in Change-Id: Iad9040d0f5ee397c7d46b1d64bc5bebf2def57bc)

Replaces PR #2158

Change-Id: Ia7c7de0407f9790284c418fb6edde948b922ab62
2019-09-25 21:52:15 +00:00
Jacob Trimble ab6d06320e Convert debug files to ES6.
Issue #1157

Change-Id: I11bae98bcfff812589f69f38d446e655776eadc8
2019-05-31 17:49:49 +00:00
Jacob Trimble c81389741f Prefer const over let.
A coming update to the Google eslint config will require using "const"
over "let".  This makes that one change to isolate the big changes.

Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
2019-05-08 09:22:10 -07:00
Jacob Trimble f70436540c Convert 'var' to 'let'/'const' (3 of 9).
This is part of a change to convert all usages of 'var' with either
'let' or 'const'.  This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.

Change-Id: I10f5c38a8b06b5797c6eec7492829084114514c9
2018-02-14 00:47:03 +00:00
Jacob Trimble 19973d63f4 Changed copyright headers from 2015 to 2016.
Change-Id: I429ff27e4794c03b7ea392e38415075077f9bfb1
2016-03-15 16:32:13 -07:00
Jacob Trimble 8daf53e329 Renamed shaka.asserts to goog.asserts.
Using goog.asserts will work with the compiler.  So rather than
simply casting a nullable value when passing to a method, we can use
an assert which will correct the type and print a log if it somehow
is null.

This is not the same goog.asserts found in closure library, this
simply calls console.assert, but it is not required to do anything
for the compiler help.

Change-Id: I2548e39e772f0aa7ec41437cf9f5a2be383e0fbd
2016-03-11 15:29:20 -08:00
Joey Parrish 3bb8f06b7d Require assertion messages
This will enforce messages on assertions, which should make console
logs more useful.

Change-Id: I2cff9e20f630d1d4d46192e2ee317b1942cc7188
2016-01-08 13:29:56 -08:00
Joey Parrish 4cc4e96dbd Overhaul license comments and file annotations
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
  compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.

This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.

Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
2015-09-08 12:02:34 -07:00
Joey Parrish 4d9177240a Revert "Adding license annotation to js files."
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.

The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.

We can re-examine this once we have restructured the license headers.

Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
2015-09-04 18:36:39 -07:00
Yohann Connell 8cb24652cb Adding license annotation to js files.
Change-Id: Id10592ccaf35608ac4f01844cae2fec4a2030d65
2015-09-04 00:05:17 +00:00
Thomas Stephens 0f914cf953 Removing unnecessary @type annotation 2015-06-26 10:23:10 -05:00
Thomas Stephens 2c7196ca07 Removing unnecessary @type annotation 2015-06-26 09:13:54 -05:00
Thomas Stephens 5abe5b59df Adding missing docs and type annotations 2015-06-25 09:23:20 -05:00
Thomas Stephens 6a235a107e Code review comments 2015-06-24 22:08:14 -05:00
Thomas Stephens 4e14ff8a6f Code review comments 2015-06-19 11:27:18 -05:00
Thomas Stephens 2ed347862e Patching console.assert when it does not exist, or when bind is not implemented on it (IE 9 with F12 Developer Tools open) 2015-06-18 16:47:29 -05:00
Joey Parrish b3d035be9f Shaka Player release v1.0 2014-12-19 14:26:19 -08:00