feat(npm-aqua-compiler): create package (#401)

* Add npm-aqua-compiler package

* Release new package

* Remove noUncheckedIndexedAccess from tsconfig.json

* Fix a test script

* Fix length checks

* Fix

* Update error description

* Try to choose a nicer err message

* New import format and API

* Fix error message

* Improve test

* Don't add empty string key when globalImports prop is empty

* Fix exports
This commit is contained in:
Akim
2023-12-15 23:14:07 +07:00
committed by GitHub
parent ac407c204d
commit d6008110cf
49 changed files with 1653 additions and 154 deletions

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
import assert from "node:assert";
import { dirname, join } from "path";
import { fileURLToPath } from "url";
@ -45,6 +46,8 @@ const test = async () => {
const browser = await puppeteer.launch();
const page = (await browser.pages())[0];
assert(page);
page.on("console", (message) => {
console.log(`${message.type().toUpperCase()}: ${message.text()}`);
});
@ -77,7 +80,7 @@ const test = async () => {
await browser.close();
await stopServer(localServer);
if (content == null) {
if (content === null || content === undefined) {
throw new Error("smoke test failed!");
}
};