TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
24.51k stars 3.03k forks source link

test(angular-table): add test case #5568

Closed riccardoperra closed 1 month ago

riccardoperra commented 1 month ago

I'm introducing some test cases to check the FlexRenderDirective and createAngularTable behaviors.

The setup is the same of @tanstack/angular-query, so we are currently using vitest and @analogjs plugin. We can may add in the future some test with angular-testing-library to do some rendering testing like the react package

I have found somes issues to the proxy implementation:

In a previous commit we also removed the Signal signature to the createAngularTable return type. I've reintroduced it since our table object is both signal and proxy

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit bd70b62d434b926a70c48043fbc3d58cf807fe4c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target - [`nx affected --targets=test:format,test:sherif,test:knip,test:lib,test:types,build --parallel=3`](https://cloud.nx.app/runs/GepmJmdobC?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

KevinVandy commented 1 month ago

I can't figure out why I'm getting this error when running the project locally now

image
riccardoperra commented 1 month ago

I'll try to look into it this evening. I did a fast check and had the same error :/

In my previous experiences I had a similiar issue when node_modules was not clean, for example when multiple angular version were installed. Could this be related to the pnpm v9 and nx update? 🤔

riccardoperra commented 1 month ago

Fyi this seems a similar issue https://github.com/angular/angular/issues/55709

riccardoperra commented 1 month ago

@KevinVandy I don't know what happened, but I can confirm to you this is an issue related to some installed deps issue

After doing the below steps in order, I'm now able again to run the examples without any issues :/

  1. remove all node_modules and build folder

    find . -path '*/node_modules/*' -delete
    find . -path '*/build/*' -delete
  2. remove pnpm-lock.yaml

  3. remove .nx folder

  4. run pnpm store prune --force

  5. run pnpm install

  6. run pnpm build

I updated all package.json in order to have the same installed angular version (17.3.9)


IMPORTANT

This thing make me crazy 😄 Updating angular with the same version is not enough. I have to remove also pnpm-lock.yaml and recreate everything from scratch. Unfortunately this cause some issues while building the qwik demos which break the CI (look to the previous run error https://github.com/TanStack/table/actions/runs/9197713380)

EDIT 2

Everything seems working in my machine and in the CI after pnpm dedupe, but I don't know if this is ok for you. https://pnpm.io/cli/dedupe