closure-compiler
closure-compiler copied to clipboard
A JavaScript checker and optimizer.
Added browser externs for Web Locks API - based on definitions from latest W3C draft [](https://www.w3.org/TR/2023/WD-web-locks-20230105/). The coverage is already great and API synergy with web workers cannot be overstated....
Long bigint literals written in hexadecimal format (such as `0x123456789ABDEFn`) should be kept as is. Currently GCC expands them to decimal bigint literals, which increases the compiled size significantly (up...
Hello, not sure if this is expected behavior. Below code is minimal sample tested in ADVANCED mode on: https://closure-compiler.appspot.com/ ``` /** * @constructor * @struct */ function SGlobal() { this.className...
Hello, I'm trying to use --warnings_allowlist_file to dismiss this warning type: ` warning JSC_UNRECOGNIZED_TYPE_ERROR: Bad type annotation. Unknown type XYZ ` I know it is reading my file because if...
It is mentioned in various places that `.toString()` method has a hardcoded `@nosideeffects` property. (e.g., [Angular nosideeffect annotation)](https://github.com/angular/angular/blob/67b2c336bc0bdce3f7ae054c094990a9831f5b20/packages/core/src/util/closure.ts#L9-L20 )) (On a side note, is this hack still relevant after the...
Using v20240317 with the following files (attached here: [repro.zip](https://github.com/user-attachments/files/15936720/repro.zip)) ```js // namespace.js globalThis.MyNamespace = {}; ``` ```js // class.js const MyNamespace = globalThis.MyNamespace; MyNamespace.MyClass = class MyClass {} ``` ```js...
Example: https://github.com/google/closure-compiler/actions/runs/9704666554/job/26785314354 ``` Error: Unable to resolve action `ossf/scorecard-action@v2`, unable to find version `v2` ```
I use the Function com.google.javascript.jscomp.Compiler#compile(java.util.List, java.util.List, com.google.javascript.jscomp.CompilerOptions) for compiling dynamic JS-Files before delivering them to the client. There, the following ConcurrentModificationException occurs: Caused by: java.util.ConcurrentModificationException: null at java.base/java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1521) at java.base/java.util.TreeMap$KeyIterator.next(TreeMap.java:1575)...
Regardless of what's specified in `maven_artifacts.bzl`, closure-compiler version v20240317 (and later builds) seem to contain protobuf-java version 3.17.0. At least that's what `META-INF/maven/com.google.protobuf/protobuf-java/pom.xml` in https://repo1.maven.org/maven2/com/google/javascript/closure-compiler/v20240317/closure-compiler-v20240317.jar says. Local builds of the...
Support `export` statements from the entry point file. This will enable many requested features such as - import chunking (e.g., [Dynamic Import Support](https://docs.google.com/document/d/1thSbGV5i96jltVwn76KYrPkWoNc-yj_KU3HtBGUCgMc/edit#heading=h.c037si364tjn)) - dynamic import while giving the user...