unity-builder icon indicating copy to clipboard operation
unity-builder copied to clipboard

Convert runtime from NodeJS to Deno (TS as runtime)

Open webbertakken opened this issue 2 years ago • 4 comments

Context

Prerequisite for #401

Changes

  • [x] Rewrite relative imports to use .ts and not reference folders
  • [x] Handle env variables process.env becomes Deno.env.get()/set()
  • [ ] Handle process.platform and other usages of node process.
  • [x] Convert __dirname and __filename to 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 path to 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/core to use Deno replacement
  • [x] Convert Node package @actions/exec to use Deno replacement
  • [ ] Convert Node package semver to use Deno replacement
  • [x] Convert Node package nanoid to use Deno replacement
  • [x] Convert Node package commander-ts to use Deno replacement
  • [x] Convert Node package uuid to use Deno replacement
  • [ ] Convert Node package zlib to use Deno replacement
  • [x] Convert Node package yaml to use Deno replacement
  • [x] Convert Node package console to use Deno replacement
  • [ ] Convert Node package child_process to use Deno replacement
  • [x] Convert Node package unity-changeset to use Deno replacement
  • [x] Command deno run -A --unstable src/index.ts not erroring out
  • [x] Port async-wait-until which is currently not available on Deno.
  • [ ] Setting composite action to install deno and run deno run -A --unstable src/index.ts with 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)

webbertakken avatar Jun 07 '22 22:06 webbertakken

Cat Gif

github-actions[bot] avatar Jun 07 '22 22:06 github-actions[bot]

Asked Mob-sakai if they are up for making unity-changeset Deno-compatible.

https://github.com/mob-sakai/unity-changeset/issues/13

webbertakken avatar Jun 24 '22 23:06 webbertakken

Asked Mob-sakai if they are up for making unity-changeset Deno-compatible.

mob-sakai/unity-changeset#13

This was done and incorporated

webbertakken avatar Aug 01 '22 23:08 webbertakken

I'm using deno run --allow-all .\src\index.ts build --projectPath=./test-project --buildName=testing -allowDirtyBuild to test the current state

webbertakken avatar Aug 07 '22 23:08 webbertakken

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.

webbertakken avatar Sep 01 '22 20:09 webbertakken