microsoft / kiota-typescript

TypeScript libraries for Kiota-generated API clients.
https://aka.ms/kiota/docs
MIT License
37 stars 27 forks source link

chore: change to vitest and remove cjs bundling. #1102

Closed musale closed 5 months ago

musale commented 7 months ago

closes #1072, closes #1055

This is a change that is part of a bigger goal to improve our confidence in browser testing and update the codebase to adapt to node/browser environment without throwing errors:

Status

musale commented 7 months ago

@baywet I'm having a blocker with completing this. When running the steps to build and test, there's an error with building that comes from having build instructions in tsconfig that outputs commonjs. I think it would be a good idea to make a decision on #1055 to unblock this. What do you think?

baywet commented 7 months ago

Agreed, let's get confirmation on the PM side. If Seb doesn't reply within a few days, please reach out to him directly

koros commented 5 months ago

Hi @musale, Can you please give instructions on how to run the build and tests locally. this is what I get:

npm run build

npm-run-build

npm run test

npm-run-test

musale commented 5 months ago

Hi @musale, Can you please give instructions on how to run the build and tests locally. this is what I get:

npm run build

npm-run-build

npm run test

npm-run-test

Hi @koros this CI/CD pipeline and build is adapted for a Linux environment. I see you're using PowerShell and this will fail for commands like clean and tsconfig file path resolutions. Please use WSL or a Linux environment to test this.

koros commented 5 months ago

Hi @musale, Can you please give instructions on how to run the build and tests locally. this is what I get:

npm run build

npm-run-build

npm run test

npm-run-test

Hi @koros this CI/CD pipeline and build is adapted for a Linux environment. I see you're using PowerShell and this will fail for commands like clean and tsconfig file path resolutions. Please use WSL or a Linux environment to test this.

@musale this seems to resolve the issue on Win OS

    "build:@microsoft/*": "lerna run build --scope \"@microsoft/*\"",
    "clean": "lerna run --parallel --stream --scope \"@microsoft/*\" clean",
    "test:browser": "lerna run --scope \"@microsoft/*\" test:browser",
    "test:node": "lerna run --scope \"@microsoft/*\" test:node",

See: https://github.com/magento/pwa-studio/issues/236#issuecomment-422485988