@naturalcycles/dev-lib 20.37.1 → 20.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ import fs from 'node:fs'
|
|
|
16
16
|
import { _assert } from '@naturalcycles/js-lib/error/assert.js'
|
|
17
17
|
import { semver2 } from '@naturalcycles/js-lib/semver'
|
|
18
18
|
import { exec2 } from '@naturalcycles/nodejs-lib/exec2'
|
|
19
|
-
import
|
|
19
|
+
import picomatch from 'picomatch'
|
|
20
20
|
import { prettierExtensionsAll, lintExclude, minActionlintVersion } from './_cnst.js'
|
|
21
21
|
|
|
22
22
|
const oxfmtConfigPath = ['.oxfmtrc.jsonc', '.oxfmtrc.json'].find(fs.existsSync)
|
|
@@ -132,7 +132,8 @@ export function runActionlintOxfmt(match) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
function getFilesList(match) {
|
|
135
|
-
|
|
135
|
+
const isExcluded = picomatch(lintExclude)
|
|
136
|
+
return match.filter(f => !isExcluded(f)).join(' ')
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
function canRunBinary(name) {
|
|
@@ -4,7 +4,7 @@ import { _ms } from '@naturalcycles/js-lib/datetime'
|
|
|
4
4
|
* A minimal reporter that only shows failures and the final summary.
|
|
5
5
|
* No per-test, no per-file output - just failures and final summary.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* @deprecated because 'agent' reported is introduced and is better
|
|
8
8
|
*/
|
|
9
9
|
export class SummaryOnlyReporter {
|
|
10
10
|
onTestRunEnd(testModules) {
|
package/cfg/vitest.config.d.ts
CHANGED
package/cfg/vitest.config.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
|
+
import { isAgent } from 'std-env'
|
|
2
3
|
import { defineConfig } from 'vitest/config'
|
|
3
|
-
import { SummaryOnlyReporter } from './summaryOnlyReporter.js'
|
|
4
4
|
import { SummaryReporter } from './summaryReporter.js'
|
|
5
5
|
import { VitestAlphabeticSequencer } from './vitestAlphabeticSequencer.js'
|
|
6
6
|
export { SummaryReporter } from './summaryReporter.js'
|
|
7
7
|
export { CollectReporter } from './collectReporter.js'
|
|
8
|
-
export { SummaryOnlyReporter } from './summaryOnlyReporter.js'
|
|
9
8
|
|
|
10
9
|
const runsInIDE = doesItRunInIDE()
|
|
11
10
|
const testType = getTestType(runsInIDE)
|
|
@@ -124,18 +123,18 @@ export function getSharedConfig(cwd) {
|
|
|
124
123
|
|
|
125
124
|
function getReporters(junitReporterEnabled, testType) {
|
|
126
125
|
// VITEST_REPORTER env var allows overriding the default reporter
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (VITEST_REPORTER === 'summary' || CLAUDE_CODE) {
|
|
131
|
-
return [new SummaryOnlyReporter()]
|
|
126
|
+
const { VITEST_REPORTER, GITHUB_ACTIONS } = process.env
|
|
127
|
+
if (VITEST_REPORTER) {
|
|
128
|
+
return [VITEST_REPORTER]
|
|
132
129
|
}
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
|
|
131
|
+
if (isAgent) {
|
|
132
|
+
return ['agent']
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
return [
|
|
138
136
|
'default',
|
|
137
|
+
GITHUB_ACTIONS && 'github-actions',
|
|
139
138
|
new SummaryReporter(),
|
|
140
139
|
junitReporterEnabled && [
|
|
141
140
|
'junit',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.38.1",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"prompts": "^2",
|
|
7
7
|
"@naturalcycles/js-lib": "^15",
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
"eslint-plugin-oxlint": "^1",
|
|
11
11
|
"globals": "^17",
|
|
12
12
|
"lint-staged": "^16",
|
|
13
|
-
"
|
|
13
|
+
"picomatch": "^4",
|
|
14
14
|
"oxfmt": "^0",
|
|
15
15
|
"oxlint": "^1",
|
|
16
|
-
"oxlint-tsgolint": "^0"
|
|
16
|
+
"oxlint-tsgolint": "^0",
|
|
17
|
+
"std-env": "^4"
|
|
17
18
|
},
|
|
18
19
|
"peerDependencies": {
|
|
19
20
|
"@eslint/js": "^9",
|