itee-tasks 1.0.7 → 1.0.9
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [v1.0.9](https://github.com/Itee/itee-tasks/compare/v1.0.8...v1.0.9) (2026-01-14)
|
|
2
|
+
|
|
3
|
+
# [v1.0.8](https://github.com/Itee/itee-tasks/compare/v1.0.7...v1.0.8) (2026-01-14)
|
|
4
|
+
|
|
5
|
+
## 🐛 Bug Fixes
|
|
6
|
+
- [`5b4e026`](https://github.com/Itee/itee-tasks/commit/5b4e026) (utils) fix management of task file that does not contain .task in their filename
|
|
7
|
+
|
|
1
8
|
# [v1.0.7](https://github.com/Itee/itee-tasks/compare/v1.0.6...v1.0.7) (2026-01-14)
|
|
2
9
|
|
|
3
10
|
## 🐛 Bug Fixes
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { jsonReporter }
|
|
2
|
-
import { playwrightLauncher }
|
|
3
|
-
import { join } from 'node:path'
|
|
4
|
-
import { iteePackageNodeModulesDirectory } from '../../../sources/_utils.mjs'
|
|
5
|
-
|
|
1
|
+
import { jsonReporter } from '@itee/json-reporter'
|
|
2
|
+
import { playwrightLauncher } from '@web/test-runner-playwright'
|
|
6
3
|
|
|
7
4
|
export default {
|
|
8
5
|
files: [
|
|
9
|
-
'tests/benchmarks/**/*.bench.js'
|
|
10
|
-
'!tests/benchmarks/builds/**',
|
|
6
|
+
'tests/benchmarks/**/*.bench.js'
|
|
11
7
|
],
|
|
12
8
|
debug: false,
|
|
13
9
|
nodeResolve: true,
|
|
@@ -17,7 +13,7 @@ export default {
|
|
|
17
13
|
playwrightLauncher( { product: 'firefox' } ),
|
|
18
14
|
],
|
|
19
15
|
testFramework: {
|
|
20
|
-
path:
|
|
16
|
+
path: 'node_modules/@itee/benchmarks-framework/benchmarks-framework.js',
|
|
21
17
|
config: {
|
|
22
18
|
foo: 'bar'
|
|
23
19
|
}
|
package/package.json
CHANGED
package/sources/_utils.mjs
CHANGED
|
@@ -57,9 +57,9 @@ function getTaskConfigurationPathFor( filename ) {
|
|
|
57
57
|
: relative( packageTasksDirectory, filename )
|
|
58
58
|
|
|
59
59
|
// Generate all possible config file path depending on file extension and default or user defined
|
|
60
|
-
const terminalExtension
|
|
61
|
-
const searchValue
|
|
62
|
-
const replaceValues
|
|
60
|
+
const terminalExtension = extname( relativeTaskPath )
|
|
61
|
+
const searchValue = relativeTaskPath.includes( '.task.' ) ? `.task${ terminalExtension }` : terminalExtension
|
|
62
|
+
const replaceValues = [
|
|
63
63
|
'.conf.json',
|
|
64
64
|
'.conf.js',
|
|
65
65
|
'.conf.mjs',
|
|
@@ -73,14 +73,16 @@ function getTaskConfigurationPathFor( filename ) {
|
|
|
73
73
|
const packageConfigurationPath = join( packageTasksConfigurationsDirectory, configurationLocation )
|
|
74
74
|
const defaultConfigurationPath = join( iteePackageConfigurationsDirectory, configurationLocation )
|
|
75
75
|
|
|
76
|
-
packageConfigurationPaths.push(packageConfigurationPath)
|
|
77
|
-
defaultConfigurationPaths.push(defaultConfigurationPath)
|
|
76
|
+
packageConfigurationPaths.push( packageConfigurationPath )
|
|
77
|
+
defaultConfigurationPaths.push( defaultConfigurationPath )
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
// Take care of the configuration search order (package first then default !)
|
|
81
|
+
const configurationPaths = [ ...packageConfigurationPaths, ...defaultConfigurationPaths ]
|
|
82
|
+
let configurationPath = undefined
|
|
81
83
|
|
|
82
|
-
// Looking for
|
|
83
|
-
for ( const packageConfigurationPath of
|
|
84
|
+
// Looking for existing configuration file
|
|
85
|
+
for ( const packageConfigurationPath of configurationPaths ) {
|
|
84
86
|
|
|
85
87
|
if ( existsSync( packageConfigurationPath ) ) {
|
|
86
88
|
configurationPath = packageConfigurationPath
|
|
@@ -89,23 +91,9 @@ function getTaskConfigurationPathFor( filename ) {
|
|
|
89
91
|
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
// Then search for default if not found
|
|
93
|
-
if ( !configurationPath ) {
|
|
94
|
-
|
|
95
|
-
for ( const defaultConfigurationPath of defaultConfigurationPaths ) {
|
|
96
|
-
|
|
97
|
-
if ( existsSync( defaultConfigurationPath ) ) {
|
|
98
|
-
configurationPath = defaultConfigurationPath
|
|
99
|
-
break
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
94
|
// Else throw an error
|
|
107
95
|
if ( !configurationPath ) {
|
|
108
|
-
throw new Error( `Unable to find configuration in package configuration paths ${
|
|
96
|
+
throw new Error( `Unable to find configuration in package configuration paths ${ configurationPaths.join( ', ' ) }.` )
|
|
109
97
|
}
|
|
110
98
|
|
|
111
99
|
return configurationPath
|