[EngSys] Remove esm from default ts-node (#29340)

### Packages impacted by this PR

All via dev-tool

### Issues associated with this PR

Contributes to #28617

### Describe the problem that is addressed by this PR

esm is still being required in our test:node-ts-input and I don't
believe it is necessary. I'm removing it, but PLEASE do let me know what I'm missing -
I don't know much about mocha config to be honest.
This commit is contained in:
Maor Leger 2024-04-17 12:15:02 -10:00 коммит произвёл GitHub
Родитель 456ee9a38a
Коммит 6da7f749da
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -20,6 +20,7 @@
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "echo skipped",
"lint:fix": "eslint --no-eslintrc -c ../../../sdk/.eslintrc.internal.json package.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint --no-eslintrc -c ../../../sdk/.eslintrc.internal.json package.json src test --ext .ts",
"pack": "npm pack 2>&1",

Просмотреть файл

@ -24,9 +24,7 @@ export default leafCommand(commandInfo, async (options) => {
const isModuleProj = await isModuleProject();
const reporterArgs =
"--reporter ../../../common/tools/mocha-multi-reporter.js --reporter-option output=test-results.xml";
const defaultMochaArgs = `${
isModuleProj ? "--loader=ts-node/esm " : "-r esm "
}-r ts-node/register ${reporterArgs} --full-trace`;
const defaultMochaArgs = `--loader=ts-node -r ts-node/register ${reporterArgs} --full-trace`;
const updatedArgs = options["--"]?.map((opt) =>
opt.includes("**") && !opt.startsWith("'") && !opt.startsWith('"') ? `"${opt}"` : opt,
);

Просмотреть файл

@ -60,7 +60,7 @@
"extract-api": "npm run check:src:strict && npm run build:src && api-extractor run --local",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "cross-env NODE_OPTIONS='--dns-result-order=ipv4first' mocha -r test/mocha.env.ts -r ts-node/register -r esm -r dotenv/config -r ./test/public/common/setup.ts --reporter ../../../common/tools/mocha-multi-reporter.js --reporter-option output=test-results.xml \"./test/internal/**/*.spec.ts\" \"./test/public/**/*.spec.ts\" --timeout 100000",
"integration-test:node": "cross-env NODE_OPTIONS='--dns-result-order=ipv4first' mocha --loader=ts-node -r test/mocha.env.ts -r ts-node/register -r dotenv/config -r ./test/public/common/setup.ts --reporter ../../../common/tools/mocha-multi-reporter.js --reporter-option output=test-results.xml \"./test/internal/**/*.spec.ts\" \"./test/public/**/*.spec.ts\" --timeout 100000",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts",