@eui/tools 6.12.33 → 6.12.34
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/.version.properties +1 -1
- package/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/sandbox.js +36 -4
- package/scripts/utils/publish/npm.js +42 -19
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.12.
|
|
1
|
+
6.12.34
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.12.34 (2023-08-02)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* check for already published package on publish script - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([4a0e4db7](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/4a0e4db7bee3d1224285f3d3d61a0b603d61f240))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.12.33 (2023-07-26)
|
|
2
11
|
|
|
3
12
|
##### Chores
|
package/package.json
CHANGED
package/sandbox.js
CHANGED
|
@@ -20,6 +20,7 @@ const translationUtils = require('./scripts/utils/pre-build/translations/transla
|
|
|
20
20
|
const preBuildUtils = require('./scripts/utils/pre-build/pre-build-utils');
|
|
21
21
|
const apiUtils = require('./scripts/utils/api-utils');
|
|
22
22
|
const versionUtils = require('./scripts/csdr/version/version-utils');
|
|
23
|
+
const publishUtils = require('./scripts/utils/publish/publish-utils');
|
|
23
24
|
|
|
24
25
|
// console.log(configUtils.packages.getPackages());
|
|
25
26
|
// console.log(configUtils.packages.getPackage('eui-tools'));
|
|
@@ -1256,13 +1257,44 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
|
|
|
1256
1257
|
// .catch((e) => {
|
|
1257
1258
|
// console.log(e);
|
|
1258
1259
|
// })
|
|
1260
|
+
// Promise.resolve()
|
|
1261
|
+
// .then(() => {
|
|
1262
|
+
// // old package without gates forced
|
|
1263
|
+
// const pkg = configUtils.packages.getPackage('cc-flex-ui', true);
|
|
1264
|
+
// console.log(pkg);
|
|
1265
|
+
|
|
1266
|
+
// return auditUtils.styles.audit(pkg);
|
|
1267
|
+
// })
|
|
1268
|
+
// .then((report) => {
|
|
1269
|
+
// console.log(report);
|
|
1270
|
+
// })
|
|
1271
|
+
|
|
1272
|
+
// .catch((e) => {
|
|
1273
|
+
// console.log(e);
|
|
1274
|
+
// })
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
// BUILD PACKAGE FIRST !!
|
|
1279
|
+
|
|
1280
|
+
const pkg = configUtils.packages.getPackage('eui');
|
|
1281
|
+
const pkgChild = configUtils.packages.getPackage('eui-base');
|
|
1282
|
+
const version = '15.4.1';
|
|
1283
|
+
|
|
1259
1284
|
Promise.resolve()
|
|
1260
1285
|
.then(() => {
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1286
|
+
return versionUtils.package.updateVersion(pkg,version);
|
|
1287
|
+
})
|
|
1288
|
+
.then(() => {
|
|
1289
|
+
return buildPackageUtils.postBuild(pkg);
|
|
1290
|
+
})
|
|
1291
|
+
.then(() => {
|
|
1292
|
+
// IF individual child packages have to be published individually
|
|
1264
1293
|
|
|
1265
|
-
|
|
1294
|
+
// console.log(pkgChild);
|
|
1295
|
+
// const publishNpmCore = require('./scripts/utils/publish/npm');
|
|
1296
|
+
// return publishNpmCore.publishCore(pkgChild, 'https://registry.npmjs.org', true)
|
|
1297
|
+
return publishUtils.publish(pkg);
|
|
1266
1298
|
})
|
|
1267
1299
|
.then((report) => {
|
|
1268
1300
|
console.log(report);
|
|
@@ -22,17 +22,28 @@ const getPkgVersion = (pkg) => {
|
|
|
22
22
|
return version;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
async function runCommandWithOutput(_args, cwdFolder) {
|
|
26
|
+
const { error, stdout, stderr } = await execa('npm', _args, { cwd: cwdFolder });
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
error, stdout, stderr
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const publishCore = module.exports.publishCore = (pkg, registry, isPublicAccess) => {
|
|
26
34
|
tools.logInfo(`Publishing package "${pkg.name}" from "${pkg.paths.publish}" on ${registry}`);
|
|
27
35
|
|
|
28
|
-
let
|
|
36
|
+
let args = ['publish', pkg.paths.publish, '--registry', registry];
|
|
37
|
+
|
|
38
|
+
// let command = `npm publish ${pkg.paths.publish} --registry ${registry}`;
|
|
29
39
|
|
|
30
40
|
if (isPublicAccess) {
|
|
31
|
-
|
|
41
|
+
args.push('--access public');
|
|
42
|
+
// command += ' --access public';
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
if (dryRun) {
|
|
35
|
-
tools.logInfo(`DRY-RUN: npm publish command to be executed : ${
|
|
46
|
+
tools.logInfo(`DRY-RUN: npm publish command to be executed : ${args}`);
|
|
36
47
|
|
|
37
48
|
return notificationUtils.package.sendPackageMessage({
|
|
38
49
|
package: pkg,
|
|
@@ -41,12 +52,16 @@ const publishCore = (pkg, registry, isPublicAccess) => {
|
|
|
41
52
|
|
|
42
53
|
} else {
|
|
43
54
|
|
|
44
|
-
tools.logInfo(`Executing command : ${
|
|
55
|
+
tools.logInfo(`Executing command : ${args}`);
|
|
45
56
|
|
|
46
57
|
const version = getPkgVersion(pkg);
|
|
47
58
|
|
|
48
|
-
return
|
|
49
|
-
|
|
59
|
+
return runCommandWithOutput(args, process.cwd())
|
|
60
|
+
// return execa.shell(command, { stdio: 'inherit' })
|
|
61
|
+
.then((out) => {
|
|
62
|
+
tools.logInfo('NPM output');
|
|
63
|
+
console.log(out.stdout);
|
|
64
|
+
|
|
50
65
|
tools.logSuccess('OK => Package release succeeded! version : ' + version);
|
|
51
66
|
|
|
52
67
|
return notificationUtils.package.sendPackageMessage({
|
|
@@ -64,19 +79,27 @@ const publishCore = (pkg, registry, isPublicAccess) => {
|
|
|
64
79
|
})
|
|
65
80
|
|
|
66
81
|
.catch((e) => {
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
// continue publication of other sub-packages in the same group (eUI f.e.) if one of the sub-packages
|
|
83
|
+
// have already been published, as npmjs does not allow re-publication of same pkg version
|
|
84
|
+
if (e.stderr !== undefined && e.stderr.indexOf('You cannot publish over the previously published versions') > -1) {
|
|
85
|
+
console.log('PACKAGE ALREADY PUBLISHED');
|
|
86
|
+
return Promise.resolve();
|
|
69
87
|
|
|
70
|
-
|
|
71
|
-
package
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
88
|
+
} else {
|
|
89
|
+
tools.logError(`Error publishing package "${pkg.name}"`);
|
|
90
|
+
console.log(e.stderr);
|
|
91
|
+
|
|
92
|
+
return notificationUtils.package.sendPackageMessage({
|
|
93
|
+
package: pkg,
|
|
94
|
+
version: version,
|
|
95
|
+
exception: e,
|
|
96
|
+
title: '[PACKAGE RELEASE FAILED]',
|
|
97
|
+
subtitle: `Error while publishing Package to *${registry}*`
|
|
98
|
+
})
|
|
99
|
+
.then(() => {
|
|
100
|
+
process.exit(1);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
80
103
|
});
|
|
81
104
|
}
|
|
82
105
|
}
|