diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 14d0b7d5ae..8fca17cf63 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -64,7 +64,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: '17.x' + node-version-file: './ui/.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Build UI run: make build-ui @@ -91,7 +91,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: '17.x' + node-version-file: './ui/.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Build and install dependencies # There's a `git restore` in here because `make install-go-ci-dependencies` is actually messing up go.mod & go.sum. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e2fcc1acb..aaa3f48b51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "lts/*" + node-version-file: './ui/.nvmrc' - name: Release (Dry Run) id: get_versions run: | @@ -62,7 +62,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "lts/*" + node-version-file: './ui/.nvmrc' - name: Bump file versions run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION} - name: Install yarn dependencies @@ -103,7 +103,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "lts/*" + node-version-file: './ui/.nvmrc' - name: Bump file versions (temporarily for Web UI publish) run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION} - name: Install yarn dependencies @@ -138,7 +138,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "lts/*" + node-version-file: './ui/.nvmrc' - name: Set up Homebrew id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index efce61b7b2..af23c8d808 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -49,7 +49,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: - node-version: '20.x' + node-version-file: './ui/.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Install yarn dependencies working-directory: ./ui diff --git a/ui/.nvmrc b/ui/.nvmrc new file mode 100644 index 0000000000..67e145bf0f --- /dev/null +++ b/ui/.nvmrc @@ -0,0 +1 @@ +v20.18.0 diff --git a/ui/CONTRIBUTING.md b/ui/CONTRIBUTING.md index 3c13759e26..f75c34c2a5 100644 --- a/ui/CONTRIBUTING.md +++ b/ui/CONTRIBUTING.md @@ -21,6 +21,9 @@ You can see the logic in [../sdk/python/feast/ui](../sdk/python/feast/ui/). This Under the hood, what happens is that the Feast SDK spins up a server which exposes an endpoint to the registry. It then mounts the UI on the server and points it to fetch data from that registry. +## Node.js version +[Node Version Manager](https://github.com/nvm-sh/nvm) is used for conveniently ensuring a consistent Node.js version. The version is defined in the [`.nvmrc`](.nvmrc) file, and you can install and use that version by running `nvm install` (or `nvm use` once it's installed). + ## NPM package project structure The Web UI is powered by a JSON registry dump from Feast (running `feast registry-dump`). Running `yarn start` launches a UI powered by test data. diff --git a/ui/package.json b/ui/package.json index 5de1537862..f793cd06e6 100644 --- a/ui/package.json +++ b/ui/package.json @@ -77,7 +77,7 @@ "@testing-library/react": "^16.0.1", "@testing-library/user-event": "^14.5.2", "@types/jest": "^27.0.1", - "@types/node": "^16.7.13", + "@types/node": "^20.16.13", "@types/react": "^18.3.11", "@types/react-dom": "^18.3.0", "msw": "^0.36.8", diff --git a/ui/yarn.lock b/ui/yarn.lock index 9c8c874e20..e3a9a5b7f5 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -2469,10 +2469,12 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154" integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg== -"@types/node@^16.7.13": - version "16.11.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.21.tgz#474d7589a30afcf5291f59bd49cca9ad171ffde4" - integrity sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A== +"@types/node@^20.16.13": + version "20.16.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.13.tgz#148c152d757dc73f8d65f0f6f078f39050b85b0c" + integrity sha512-GjQ7im10B0labo8ZGXDGROUl9k0BNyDgzfGpb4g/cl+4yYDWVKcozANF4FGr4/p0O/rAkQClM6Wiwkije++1Tg== + dependencies: + undici-types "~6.19.2" "@types/numeral@^2.0.5": version "2.0.5" @@ -11065,6 +11067,11 @@ undici-types@~6.19.2: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + unherit@^1.0.4: version "1.1.3" resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22"