From e3f7dee81af377bc5cece3a74dbb0b7f87c6d567 Mon Sep 17 00:00:00 2001 From: Brooke Date: Thu, 29 Jun 2023 11:18:55 +0100 Subject: [PATCH 1/4] chore: Update Wally version --- .justfile | 18 ++++++++++++++++++ aftman.toml | 2 +- vendor/luau-polyfill | 2 +- wally.toml | 12 ++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .justfile create mode 100644 wally.toml diff --git a/.justfile b/.justfile new file mode 100644 index 00000000..654c39fc --- /dev/null +++ b/.justfile @@ -0,0 +1,18 @@ +analyze: install-packages + rojo sourcemap default.project.json --output sourcemap.json + curl -O https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.lua + luau-lsp analyze --definitions=globalTypes.d.lua --base-luaurc=.luaurc --sourcemap=sourcemap.json packages/ + +# Installs packages and proxies their type information with `wally-package-types` tool +# In addition, the packages/ directory is temporarily renamed so that it isn't removed by Wally +install-packages: + rm -rf deps/ + mv packages/ temp/ + + wally install + + rojo sourcemap packages.project.json --output sourcemap.json + wally-package-types --sourcemap sourcemap.json Packages/ + + mv Packages deps/ + mv temp/ packages/ diff --git a/aftman.toml b/aftman.toml index a3489a31..878ea204 100644 --- a/aftman.toml +++ b/aftman.toml @@ -1,6 +1,6 @@ [tools] rojo = "rojo-rbx/rojo@7.2.1" -wally = "grilme99/wally@0.4.0" +wally = "UpliftGames/wally@0.3.2" stylua = "johnnymorganz/stylua@0.17.1" selene = "Kampfkarren/selene@0.25.0" luau-lsp = "johnnymorganz/luau-lsp@1.18.1" diff --git a/vendor/luau-polyfill b/vendor/luau-polyfill index ed73342e..2be9a2e0 160000 --- a/vendor/luau-polyfill +++ b/vendor/luau-polyfill @@ -1 +1 @@ -Subproject commit ed73342ef6ceb1fc19049ecd20a73eb538dc2c60 +Subproject commit 2be9a2e0b1e11f04b9116f4b391d93384dc41c68 diff --git a/wally.toml b/wally.toml new file mode 100644 index 00000000..f8b84907 --- /dev/null +++ b/wally.toml @@ -0,0 +1,12 @@ +# This config exists so we can import the dependencies of all packages for analysis and release. +# THIS PACKAGE IS NOT DIRECTLY PUBLISHED! + +[package] +name = "jsdotlua/no-op" +version = "0.1.0" +registry = "https://github.com/UpliftGames/wally-index" +realm = "shared" + +[dependencies] +LuauPolyfill = "jsdotlua/luau-polyfill@1.2.3" +Promise = "evaera/promise@4.0.0" From 13a70eae6b8c09bb24b6970f5308bcc98e992a2e Mon Sep 17 00:00:00 2001 From: Brooke Date: Thu, 29 Jun 2023 11:25:32 +0100 Subject: [PATCH 2/4] feat: Use Wally to install dependencies, instead of submodules --- .gitignore | 2 ++ .gitmodules | 3 -- .justfile | 6 ++-- aftman.toml | 1 + default.project.json | 37 +++++------------------- vendor/luau-polyfill | 1 - wally.lock | 68 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 81 insertions(+), 37 deletions(-) delete mode 100644 .gitmodules delete mode 160000 vendor/luau-polyfill create mode 100644 wally.lock diff --git a/.gitignore b/.gitignore index 8312ffe9..f5b54e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +deps/ + .DS_Store sourcemap.json diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 161cd6ab..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "vendor/luau-polyfill"] - path = vendor/luau-polyfill - url = https://github.com/jsdotlua/luau-polyfill diff --git a/.justfile b/.justfile index 654c39fc..2da15362 100644 --- a/.justfile +++ b/.justfile @@ -11,8 +11,8 @@ install-packages: wally install - rojo sourcemap packages.project.json --output sourcemap.json - wally-package-types --sourcemap sourcemap.json Packages/ - mv Packages deps/ mv temp/ packages/ + + rojo sourcemap default.project.json --output sourcemap.json + wally-package-types --sourcemap sourcemap.json deps/ diff --git a/aftman.toml b/aftman.toml index 878ea204..e55ce00d 100644 --- a/aftman.toml +++ b/aftman.toml @@ -4,3 +4,4 @@ wally = "UpliftGames/wally@0.3.2" stylua = "johnnymorganz/stylua@0.17.1" selene = "Kampfkarren/selene@0.25.0" luau-lsp = "johnnymorganz/luau-lsp@1.18.1" +wally-package-types = "johnnymorganz/wally-package-types@1.2.1" diff --git a/default.project.json b/default.project.json index fc4e3265..f00ce0ad 100644 --- a/default.project.json +++ b/default.project.json @@ -23,44 +23,21 @@ "RoactCompat": { "$path": "packages/roact-compat/default.project.json" }, - "scheduler": { + "Scheduler": { "$path": "packages/scheduler/default.project.json" }, "Shared": { "$path": "packages/shared/default.project.json" }, - "Boolean": { - "$path": "vendor/luau-polyfill/packages/boolean/default.project.json" - }, - "Collections": { - "$path": "vendor/luau-polyfill/packages/collections/default.project.json" - }, - "Console": { - "$path": "vendor/luau-polyfill/packages/console/default.project.json" - }, - "ES7Types": { - "$path": "vendor/luau-polyfill/packages/es7-types/default.project.json" - }, - "InstanceOf": { - "$path": "vendor/luau-polyfill/packages/instance-of/default.project.json" + + "_Index": { + "$path": "deps/_Index" }, "LuauPolyfill": { - "$path": "vendor/luau-polyfill/packages/luau-polyfill/default.project.json" - }, - "Math": { - "$path": "vendor/luau-polyfill/packages/math/default.project.json" - }, - "Number": { - "$path": "vendor/luau-polyfill/packages/number/default.project.json" - }, - "String": { - "$path": "vendor/luau-polyfill/packages/string/default.project.json" - }, - "Symbol": { - "$path": "vendor/luau-polyfill/packages/symbol/default.project.json" + "$path": "deps/LuauPolyfill.lua" }, - "Timers": { - "$path": "vendor/luau-polyfill/packages/timers/default.project.json" + "Promise": { + "$path": "deps/Promise.lua" } } } \ No newline at end of file diff --git a/vendor/luau-polyfill b/vendor/luau-polyfill deleted file mode 160000 index 2be9a2e0..00000000 --- a/vendor/luau-polyfill +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2be9a2e0b1e11f04b9116f4b391d93384dc41c68 diff --git a/wally.lock b/wally.lock new file mode 100644 index 00000000..03b679cb --- /dev/null +++ b/wally.lock @@ -0,0 +1,68 @@ +# This file is automatically @generated by Wally. +# It is not intended for manual editing. +registry = "test" + +[[package]] +name = "evaera/promise" +version = "4.0.0" +dependencies = [] + +[[package]] +name = "jsdotlua/boolean" +version = "1.2.3" +dependencies = [["Number", "jsdotlua/number@1.2.3"]] + +[[package]] +name = "jsdotlua/collections" +version = "1.2.3" +dependencies = [["ES7Types", "jsdotlua/es7-types@1.2.3"], ["InstanceOf", "jsdotlua/instance-of@1.2.3"]] + +[[package]] +name = "jsdotlua/console" +version = "1.2.3" +dependencies = [["Collections", "jsdotlua/collections@1.2.3"]] + +[[package]] +name = "jsdotlua/es7-types" +version = "1.2.3" +dependencies = [] + +[[package]] +name = "jsdotlua/instance-of" +version = "1.2.3" +dependencies = [] + +[[package]] +name = "jsdotlua/luau-polyfill" +version = "1.2.3" +dependencies = [["Boolean", "jsdotlua/boolean@1.2.3"], ["Collections", "jsdotlua/collections@1.2.3"], ["Console", "jsdotlua/console@1.2.3"], ["ES7Types", "jsdotlua/es7-types@1.2.3"], ["InstanceOf", "jsdotlua/instance-of@1.2.3"], ["Math", "jsdotlua/math@1.2.3"], ["Number", "jsdotlua/number@1.2.3"], ["String", "jsdotlua/string@1.2.3"], ["Symbol", "jsdotlua/symbol@1.0.0"], ["Timers", "jsdotlua/timers@1.2.3"]] + +[[package]] +name = "jsdotlua/math" +version = "1.2.3" +dependencies = [] + +[[package]] +name = "jsdotlua/no-op" +version = "0.1.0" +dependencies = [["LuauPolyfill", "jsdotlua/luau-polyfill@1.2.3"], ["Promise", "evaera/promise@4.0.0"]] + +[[package]] +name = "jsdotlua/number" +version = "1.2.3" +dependencies = [] + +[[package]] +name = "jsdotlua/string" +version = "1.2.3" +dependencies = [["ES7Types", "jsdotlua/es7-types@1.2.3"], ["Number", "jsdotlua/number@1.2.3"]] + +[[package]] +name = "jsdotlua/symbol" +version = "1.0.0" +dependencies = [] + +[[package]] +name = "jsdotlua/timers" +version = "1.2.3" +dependencies = [["Collections", "jsdotlua/collections@1.2.3"]] From 8e3be4ca30c021c679f83157f7b22bad0e71cfb5 Mon Sep 17 00:00:00 2001 From: Brooke Date: Thu, 29 Jun 2023 11:30:09 +0100 Subject: [PATCH 3/4] chore: Add Just to the release steps --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84c3a7fc..3ff8afeb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,9 @@ jobs: - name: Install Aftman uses: ok-nick/setup-aftman@v0 + - name: Install Just + uses: extractions/setup-just@v1 + - name: Authenticate Wally run: | cd packages/react @@ -34,6 +37,9 @@ jobs: - name: Publish changed packages run: bash ./scripts/publish.sh ${{ steps.latest-release.outputs.tag_name }} + - name: Install dependencies for build + run: just install-packages + - name: Build project run: rojo build --output ReactLua.rbxm From b2d35ca5e83aafa030dc15e99db94b7c2da37d86 Mon Sep 17 00:00:00 2001 From: Brooke Date: Thu, 29 Jun 2023 11:32:35 +0100 Subject: [PATCH 4/4] Add to CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8390b31..302e45bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed React build not including correct dependencies (#8) + ## [17.0.1-rc.19] - 2023-04-07 ### Added