Skip to content

Conversation

@ZauberNerd
Copy link
Contributor

Breaking change - see commit messages.

Final file size of main.wasm: 2.01 MB vs 6.86 MB before.

This commit refactors the wasm and JavaScript parts to make use of
TinyGo for creating even smaller wasm binaries.
It also introduces another wasm-opt pass that shaves off ~500K.

The API has changed: Previously the exported `createLinter()` function
was synchronous and returned an async function to lint a single file.
Now the `createLinter()` function is asynchronous and the returned
linter function is synchronous.

```js
import { createLinter } from "actionlint";
const linter = await createLinter();
const results = linter("on: psuh", "borked.yml");
```

BREAKING CHANGE: The `createLinter()` function is now asynchronous and
resolves to a function that synchronously invokes the actionlint binary.
@ZauberNerd ZauberNerd merged commit d765b30 into main Apr 27, 2022
@ZauberNerd ZauberNerd deleted the tinygo-wasm branch April 27, 2022 08:09
@github-actions
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants