@eui/tools 6.12.1 → 6.12.3

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.
@@ -253,18 +253,26 @@ module.exports.getPackageVersionFirst = (pkg) => {
253
253
  }
254
254
 
255
255
  module.exports.isNewPackageBuild = (pkg) => {
256
- tools.logInfo('Checking if package is a newly created one : first build date after 2023/06/01');
256
+ tools.logInfo('Checking if package is a newly created one : first build date after 2023/06/01 or never built for MASTER');
257
257
 
258
258
  const firstPackageVersion = this.getPackageVersionFirst(pkg);
259
+ const versionsLatest = this.getPackageVersionsLatest(pkg);
259
260
 
260
261
  if (firstPackageVersion) {
261
- const pkgDate = firstPackageVersion.date;
262
262
 
263
- const pivotDate = moment('20230601');
264
- const pkgDateM = moment(pkgDate, 'YYYYMMDD-HH:mm');
265
- tools.logInfo(`First package build version date : ${pkgDate}`);
266
- tools.logInfo(`==> NEW package : ${pkgDateM > pivotDate}`);
267
- return pkgDateM > pivotDate;
263
+ if (versionsLatest.length === 0) {
264
+ tools.logInfo(`==> package has never been built for MASTER / latest version, package is considered new`);
265
+ return true;
266
+
267
+ } else {
268
+ const pkgDate = firstPackageVersion.date;
269
+
270
+ const pivotDate = moment('20230601');
271
+ const pkgDateM = moment(pkgDate, 'YYYYMMDD-HH:mm');
272
+ tools.logInfo(`First package build version date : ${pkgDate}`);
273
+ tools.logInfo(`==> NEW package : ${pkgDateM > pivotDate}`);
274
+ return pkgDateM > pivotDate;
275
+ }
268
276
 
269
277
  } else {
270
278
  tools.logInfo(`==> no versions metadata found : first build, package is new`);