mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-15 16:06:41 +03:00
1076b78465
The Closure Library's base.js, the Closure Compiler, and the Closure deps-writer are all now loaded via NPM instead of commiting them directly to the repo. This also updates both the library and compiler to the latest version: 20200406. We still have a fork of the Closure Library's URI parser. The latest upstream version of that has too many dependencies on the rest of the library to import directly from NPM. Some internals of the build system have been refactored, and the "complete" set of files in the build system now includes third_party. Our forked URI parser does not pass lint checks yet, so the linter does not run over third_party yet. A couple of overly-severe sets of compiler checks have been disabled, since even the latest Closure Library's base.js doesn't pass them. The script-loader in load.js had to be updated for compatibility with the new Closure Library. If you don't return "true" now, Closure's base.js will stop loading subsequent source files. Some local externs that we had written are now available from the compiler, so our local copies have been deleted. A few type-related changes have been made as well, removing casts that were necessary with the old compiler, but not necessary with the new one. Finally, this corrects some type issues in the tests using the new "typeof" annotation from the compiler. This allows us to type a variable as a class defined elsewhere. For example, after loading the compiled library, we can reference compiledShaka.Player, which has the type "typeof shaka.Player". The compiler can then type-check all uses of it in the tests. Closes #2528 (bad polyfill code generated by the old compiler) Change-Id: I62ec61e82d4edf342b2c576c2d4f89f11562ee65