unity-builder
unity-builder copied to clipboard
Convert runtime from NodeJS to Deno (TS as runtime)
Context
Prerequisite for #401
Changes
- [x] Rewrite relative imports to use
.tsand not reference folders - [x] Handle env variables
process.envbecomesDeno.env.get()/set() - [ ] Handle
process.platformand other usages of node process. - [x] Convert
__dirnameand__filenameto use Deno replacement - [x] Convert Node package AWS SDK to use Deno replacement
- [ ] Test AWS flow
- [x] Convert Node package K8s SDK to use Deno replacement
- [ ] Test K8s flow
- [ ] Convert Node package crypto to use Deno replacement
- [x] Convert Node package
pathto use Deno replacement - [x] Convert Node package
fs(sync) to use Deno replacement - [x] Convert Node package
fs/promises(async) to use Deno replacement - [x] Convert Node package
@actions/coreto use Deno replacement - [x] Convert Node package
@actions/execto use Deno replacement - [ ] Convert Node package
semverto use Deno replacement - [x] Convert Node package
nanoidto use Deno replacement - [x] Convert Node package
commander-tsto use Deno replacement - [x] Convert Node package
uuidto use Deno replacement - [ ] Convert Node package
zlibto use Deno replacement - [x] Convert Node package
yamlto use Deno replacement - [x] Convert Node package
consoleto use Deno replacement - [ ] Convert Node package
child_processto use Deno replacement - [x] Convert Node package
unity-changesetto use Deno replacement - [x] Command
deno run -A --unstable src/index.tsnot erroring out - [x] Port
async-wait-untilwhich is currently not available on Deno. - [ ] Setting composite action to install deno and run
deno run -A --unstable src/index.tswith params (pretty much exactly like this as implemented in https://github.com/game-ci/unity-builder/pull/385) - [ ] Make compatible with /dist
- [ ] Successful build in CI
- [x] Remove pre-commit build hook that compiles the dist files every time (as we can now run directly from src)
- [ ] Determine whether to release as 2.x or 3.x (technically it doesn't have to be a breaking change per se)
- [ ] Add checks / tests
High level functionality:
- [x] Load user input
- [ ] Run docker
- [ ] Build project
- [ ] Output files
- [ ] Cloud Runner
Next steps after completing this:
- Start writing CLI from Unity Builder logic in https://github.com/game-ci/unity-builder/issues/401 as per v3.0.0 roadmap
- Move CLI to its own repository and base unity-builder on that CLI
- base all other actions on that CLI
- base all other CI systems on that CLI as well
Checklist
- [x] Read the contribution guide and accept the code of conduct
- [ ] Readme (updated or not needed)
- [ ] Tests (added, updated or not needed)

Asked Mob-sakai if they are up for making unity-changeset Deno-compatible.
https://github.com/mob-sakai/unity-changeset/issues/13
Asked Mob-sakai if they are up for making unity-changeset Deno-compatible.
This was done and incorporated
I'm using deno run --allow-all .\src\index.ts build --projectPath=./test-project --buildName=testing -allowDirtyBuild to test the current state
Closed in favour of https://github.com/game-ci/cli/pull/1
This is moving to a new repo. The logic of Unity Builder will be replaced by the CLI.
New changes should be added there if there is no rush.