itee-tasks 1.0.6 → 1.0.8
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 +10 -0
- package/package.json +1 -1
- package/sources/_utils.mjs +30 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# [v1.0.8](https://github.com/Itee/itee-tasks/compare/v1.0.7...v1.0.8) (2026-01-14)
|
|
2
|
+
|
|
3
|
+
## 🐛 Bug Fixes
|
|
4
|
+
- [`5b4e026`](https://github.com/Itee/itee-tasks/commit/5b4e026) (utils) fix management of task file that does not contain .task in their filename
|
|
5
|
+
|
|
6
|
+
# [v1.0.7](https://github.com/Itee/itee-tasks/compare/v1.0.6...v1.0.7) (2026-01-14)
|
|
7
|
+
|
|
8
|
+
## 🐛 Bug Fixes
|
|
9
|
+
- [`733b1f3`](https://github.com/Itee/itee-tasks/commit/733b1f3) (utils) take care of the order of configurations files between package and default
|
|
10
|
+
|
|
1
11
|
# [v1.0.6](https://github.com/Itee/itee-tasks/compare/v1.0.5...v1.0.6) (2026-01-14)
|
|
2
12
|
|
|
3
13
|
## 🐛 Bug Fixes
|
package/package.json
CHANGED
package/sources/_utils.mjs
CHANGED
|
@@ -57,39 +57,56 @@ 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',
|
|
66
66
|
]
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
const packageConfigurationPaths = []
|
|
69
|
+
const defaultConfigurationPaths = []
|
|
68
70
|
|
|
69
71
|
for ( const replaceValue of replaceValues ) {
|
|
70
72
|
const configurationLocation = relativeTaskPath.replace( searchValue, replaceValue )
|
|
71
73
|
const packageConfigurationPath = join( packageTasksConfigurationsDirectory, configurationLocation )
|
|
72
74
|
const defaultConfigurationPath = join( iteePackageConfigurationsDirectory, configurationLocation )
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
defaultConfigurationPath
|
|
77
|
-
)
|
|
76
|
+
packageConfigurationPaths.push( packageConfigurationPath )
|
|
77
|
+
defaultConfigurationPaths.push( defaultConfigurationPath )
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
// Looking for existing configuration file (care the user defined must be searched before the default !)
|
|
81
80
|
let configurationPath
|
|
82
|
-
for ( const currentConfigurationPath of configurationPaths ) {
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
// Looking for package existing configuration file first
|
|
83
|
+
for ( const packageConfigurationPath of packageConfigurationPaths ) {
|
|
84
|
+
|
|
85
|
+
if ( existsSync( packageConfigurationPath ) ) {
|
|
86
|
+
configurationPath = packageConfigurationPath
|
|
86
87
|
break
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
}
|
|
90
91
|
|
|
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
|
+
// Else throw an error
|
|
91
107
|
if ( !configurationPath ) {
|
|
92
|
-
throw new Error( `Unable to find configuration in paths ${
|
|
108
|
+
throw new Error( `Unable to find configuration in package configuration paths ${ packageConfigurationPaths.join( ', ' ) } nor in default configuration paths ${ defaultConfigurationPaths.join(
|
|
109
|
+
', ' ) }.` )
|
|
93
110
|
}
|
|
94
111
|
|
|
95
112
|
return configurationPath
|