@ckeditor/ckeditor5-dev-release-tools 35.0.6 → 36.0.1
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/lib/tasks/preparepackages.js +11 -2
- package/package.json +3 -3
|
@@ -51,6 +51,7 @@ const PACKAGE_JSON_FIELDS = [
|
|
|
51
51
|
* @param {String} options.changelogDirectory An absolute path to the directory where the `CHANGELOG.md` file is saved.
|
|
52
52
|
* @param {String} options.buildScript A name of npm script that builds the package. It is executed per package.
|
|
53
53
|
* @param {String} options.secureScript A name of npm script that secures the code in the entire repository.
|
|
54
|
+
* @param {Array.<String>} [options.npmScriptsToRemove=[]] An array of npm scripts that should be removed when processing a package.
|
|
54
55
|
* @returns {Promise}
|
|
55
56
|
*/
|
|
56
57
|
module.exports = async function preparePackages( options ) {
|
|
@@ -58,6 +59,7 @@ module.exports = async function preparePackages( options ) {
|
|
|
58
59
|
const packagesDirectory = path.join( options.cwd, options.packages );
|
|
59
60
|
const releaseDirectory = path.join( options.cwd, options.releaseDirectory );
|
|
60
61
|
const ckeditor5Version = getLastFromChangelog( options.changelogDirectory );
|
|
62
|
+
const npmScriptsToRemove = options.npmScriptsToRemove || [];
|
|
61
63
|
|
|
62
64
|
// Clean the release directory before doing anything.
|
|
63
65
|
logProcess( 'Removing the release directory...' );
|
|
@@ -91,7 +93,7 @@ module.exports = async function preparePackages( options ) {
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
logProcess( 'Preparing packages...' );
|
|
94
|
-
await preparePackagesToBeReleased( packages );
|
|
96
|
+
await preparePackagesToBeReleased( packages, npmScriptsToRemove );
|
|
95
97
|
|
|
96
98
|
// Secure the entire release directory.
|
|
97
99
|
logProcess( 'Securing the code...' );
|
|
@@ -139,9 +141,10 @@ function filterOutPackagesWithoutChanges( packages, ckeditor5Version ) {
|
|
|
139
141
|
* * Remove the `build/` directory. The build script will re-create it from the JavaScript code.
|
|
140
142
|
*
|
|
141
143
|
* @param {Map.<String, PackageJson>} packages
|
|
144
|
+
* @param {Array.<String>} npmScriptsToRemove An array of npm scripts that should be removed when processing a package.
|
|
142
145
|
* @returns {Promise}
|
|
143
146
|
*/
|
|
144
|
-
function preparePackagesToBeReleased( packages ) {
|
|
147
|
+
function preparePackagesToBeReleased( packages, npmScriptsToRemove ) {
|
|
145
148
|
return executeOnPackages( packages.keys(), async packagePath => {
|
|
146
149
|
const { name: packageName } = packages.get( packagePath );
|
|
147
150
|
|
|
@@ -167,6 +170,12 @@ function preparePackagesToBeReleased( packages ) {
|
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
172
|
|
|
173
|
+
if ( 'scripts' in packageJson ) {
|
|
174
|
+
for ( const npmScript of npmScriptsToRemove ) {
|
|
175
|
+
delete packageJson.scripts[ npmScript ];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
170
179
|
if ( !main ) {
|
|
171
180
|
return packageJson;
|
|
172
181
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-dev-release-tools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.0.1",
|
|
4
4
|
"description": "Tools used for releasing CKEditor 5 and related packages.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
8
|
+
"@ckeditor/ckeditor5-dev-utils": "^36.0.1",
|
|
9
9
|
"@octokit/rest": "^17.9.2",
|
|
10
10
|
"chalk": "^4.0.0",
|
|
11
11
|
"cli-table": "^0.3.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"strip-ansi": "^6.0.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=16.0.0",
|
|
39
39
|
"npm": ">=5.7.1"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|