[dev-tool] Update to use vitest with ESM (#29504)
### Packages impacted by this PR - @azure/dev-tool - @azure/eslint-plugin-azure-sdk ### Issues associated with this PR - #29502 ### Describe the problem that is addressed by this PR Moves the `vitest` to use `.mts` for the config to opt in to ESM builds for `vite`. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? Updated as per recommendation here https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
This commit is contained in:
Родитель
554e1c44f9
Коммит
3f3340d4af
|
@ -14,6 +14,7 @@
|
|||
"audit": "node ../../../common/scripts/rush-audit.js && rimraf --glob node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
||||
"build": "tsc",
|
||||
"build:test": "echo Skipped.",
|
||||
"build:samples": "echo Skipped.",
|
||||
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
||||
"clean": "rimraf --glob dist dist-* *.tgz *.log",
|
||||
"extract-api": "echo skipped",
|
||||
|
@ -28,7 +29,7 @@
|
|||
"unit-test": "npm run unit-test:node",
|
||||
"unit-test:node": "vitest",
|
||||
"unit-test:browser": "echo skipped",
|
||||
"build:samples": "echo Skipped.",
|
||||
|
||||
"test": "echo Skipped."
|
||||
},
|
||||
"repository": "github:Azure/azure-sdk-for-js",
|
||||
|
|
|
@ -17,10 +17,7 @@ export default defineConfig({
|
|||
coverage: {
|
||||
include: ["src/**/*.ts"],
|
||||
exclude: [
|
||||
"src/**/*-browser.mts",
|
||||
"src/**/*-react-native.mts",
|
||||
"vitest*.config.ts",
|
||||
"samples-dev/**/*.ts",
|
||||
],
|
||||
provider: "istanbul",
|
||||
reporter: ["text", "json", "html"],
|
|
@ -50,7 +50,7 @@
|
|||
"integration-test:browser": "echo skipped",
|
||||
"integration-test:node": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"unit-test:node": "cross-env VITE_CJS_IGNORE_WARNING=true vitest",
|
||||
"unit-test:node": "vitest",
|
||||
"unit-test:browser": "echo skipped",
|
||||
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
||||
"test": "npm run clean && npm run build:test && npm run unit-test"
|
||||
|
|
Загрузка…
Ссылка в новой задаче