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 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 new file mode 100644 index 00000000..2da15362 --- /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 + + mv Packages deps/ + mv temp/ packages/ + + rojo sourcemap default.project.json --output sourcemap.json + wally-package-types --sourcemap sourcemap.json deps/ 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 diff --git a/aftman.toml b/aftman.toml index a3489a31..e55ce00d 100644 --- a/aftman.toml +++ b/aftman.toml @@ -1,6 +1,7 @@ [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" +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 ed73342e..00000000 --- a/vendor/luau-polyfill +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ed73342ef6ceb1fc19049ecd20a73eb538dc2c60 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"]] 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"