itee-tasks 1.0.6 → 1.0.7

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,8 @@
1
+ # [v1.0.7](https://github.com/Itee/itee-tasks/compare/v1.0.6...v1.0.7) (2026-01-14)
2
+
3
+ ## 🐛 Bug Fixes
4
+ - [`733b1f3`](https://github.com/Itee/itee-tasks/commit/733b1f3) (utils) take care of the order of configurations files between package and default
5
+
1
6
  # [v1.0.6](https://github.com/Itee/itee-tasks/compare/v1.0.5...v1.0.6) (2026-01-14)
2
7
 
3
8
  ## 🐛 Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itee-tasks",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Allow to manage all commons itee gulp tasks into one place ",
5
5
  "keywords": [
6
6
  "itee",
@@ -64,32 +64,48 @@ function getTaskConfigurationPathFor( filename ) {
64
64
  '.conf.js',
65
65
  '.conf.mjs',
66
66
  ]
67
- const configurationPaths = []
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
- configurationPaths.push(
75
- packageConfigurationPath,
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
- if ( existsSync( currentConfigurationPath ) ) {
85
- configurationPath = currentConfigurationPath
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 ${ configurationPaths.join( ', ' ) }.` )
108
+ throw new Error( `Unable to find configuration in package configuration paths ${ packageConfigurationPaths.join( ', ' ) } nor in default configuration paths ${ defaultConfigurationPaths.join( ', ' ) }.` )
93
109
  }
94
110
 
95
111
  return configurationPath