### 🎩 What is the goal?
Implement NodeJS as another test runner.
### 📄 How is it being implemented?
In this PR, I include the following changes:
- Create an abstraction for the different Test Runners (Wasmer, browser and now Node)
- Implement the new Node test runner (quite similar to the Wasmer one)
- Unify Javascript client code, so we can make sure we apply the same patches and load in the same way all the different targets
- Create a new entry point for testing with node
- Add that new entry point to the static bundle
### 👀 Any consideration?
The Node test runner does not use the TestsParser as it heavily impacts execution time. I will try to figure out what's going on later.
### ✅ How can it be tested?
Testing is automated 🤖 . You can also check this in your own project by running:
```bash
carton test --environment node
```
This makes our codebase smaller by ~80 lines and arguably more readable. Also removes OpenCombine dependency.
* Use `async`/`await` and actors instead of Combine
* Remove OpenCombine dependency
* Fix progress animation not updated
* Stop building with Swift 5.4, clean up terminal output
* Update requirements in `README.md`
* Add `description` to `InvalidResponseCode`
* Fix Linux build error
* Rename `main.swift` to `Main.swift`
* Work around IR/TDB warnings
* Pass IR/TDB arguments correctly to `swift build`
* Support `async` process runner in `carton-release`
* Use Xcode 13.2.1 on macOS
* Pass TDB/IR flags to `swift test` as well
* Make `Install` command async
* Add doc comments, handle subsequent rebuilds
I've dropped support for Swift 5.2, and SwiftLint now requires Xcode 12.5.1, which is unavailable on macOS 10.15 with GitHub Actions. This makes it impossible to test with Swift 5.3 on CI, so I'm bumping the required version to Swift 5.4.
Resolves https://github.com/swiftwasm/carton/issues/262.
* Update dependencies, add support for SwiftWasm 5.5
* Bump dependencies in `.github/workflows/swift.yml`
* Add explicit dependency on `NIOFoundationCompat`
* Lower Splash version to 0.15 for Swift 5.3 compat
* Update DefaultToolchain.swift
* Update swift.yml
* Revert "Lower Splash version to 0.15 for Swift 5.3 compat"
This reverts commit 6e04a7f158.
* Require Swift 5.4 in `Package.swift`
* Update README.md
* Use older 5.5 snapshot, unblock tests on failure
* Update DefaultToolchain.swift
* Select correct CPU architecture when downloading
* Disable hanging test
* Use latest 5.5 toolchain
* Use 2021-11-16 snapshot of SwiftWasm 5.5
* Add missing linker flags, re-enable browser test
* Address PR feedback
Resolves#119.
* Mention the Docker image in `README.md`
* Update .dockerignore
* Test Docker image building on CI
* Bring back the GitHub token to `swift.yml`
Resolves#114.
As support for SwiftLint in Danger seems a bit buggy (causing duplicate warning comments sometimes), this PR calls SwiftLint through a separate action that displays warnings only in the PR diff and hopefully in better way.
* Add support for Ubuntu 20.04
* Refine formatting
* Move SwiftLint to a separate GitHub Action
* Fix linker warnings
* Remove `danger.yml` and `Dangerfile.swift`
* Remove `--strict` argument from `swiftlint.yml`
* Update README.md
This change requires `wasm-5.3-SNAPSHOT-2020-09-08-a` or later, therefore the default toolchain version has been bumped.
Implements the `carton dev` part of #38, `carton bundle` support will be implemented in a future PR.
Allows passing a path to your custom `index.html` as `--custom-index-page` to `carton dev` and `carton bundle`. The entrypoint script is then injected into this file with a simple text substitution looking for a closing `</head>` tag. The assumption is that your custom `<body>` is not supposed to contain an unescaped `<head></head>`, and adding a dependency on a proper HTML parser to implement this injection is too costly.
Depends on #97.
Resolves#100.
New `bundle.js` entrypoint is added, which only differs from `dev.js` in the lack of the WebSocket hot reloading bit.
`wabt` and `binaryen` Homebrew dependencies are added as required for `wasm-strip` and `wasm-opt` respectively that reduce the resulting bundle binary size.
All resulting bundle files except `index.html` are named by their content hashes to enable [cache busting](https://www.keycdn.com/support/what-is-cache-busting).
Resolves#16.
* Add a new option to the dev command to allow the passing of a destination.json file to the swift build command.
* Add missing link for destination.json spec
* adjust format
* Add a --release flag to the carton dev command
* fix typos
* remove extra line in README.md
- this add an optional flag to the `dev` command from `carton` to enable passing a `destination.json` file to the `swift build` call
- this requires that the toolchain referenced in the `destination.json` file is consistent with the one used by the `carton` process.
- it enables the importing of the `Foundation` module amongst others when running `carton dev`