@ckeditor/ckeditor5-dev-release-tools 54.2.1 → 54.2.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.
- package/lib/tasks/cleanuppackages.js +1 -1
- package/lib/tasks/preparerepository.js +22 -23
- package/lib/tasks/publishpackages.js +1 -1
- package/lib/tasks/reassignnpmtags.js +2 -2
- package/lib/tasks/updatedependencies.js +1 -1
- package/lib/tasks/updateversions.js +1 -1
- package/lib/utils/assertfilestopublish.js +1 -1
- package/lib/utils/assertnpmtag.js +1 -1
- package/lib/utils/assertpackages.js +1 -1
- package/lib/utils/confirmnpmtag.js +1 -1
- package/lib/utils/executeinparallel.js +4 -4
- package/lib/utils/getchangelog.js +2 -2
- package/lib/utils/parallelworker.js +1 -1
- package/lib/utils/publishpackageonnpmcallback.js +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import fs from 'fs/promises';
|
|
6
|
+
import fs from 'node:fs/promises';
|
|
7
7
|
import { glob } from 'glob';
|
|
8
8
|
import upath from 'upath';
|
|
9
9
|
|
|
@@ -42,32 +42,26 @@ export default async function prepareRepository( options ) {
|
|
|
42
42
|
throw new Error( `Output directory is not empty: "${ outputDirectoryPath }".` );
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const copyPromises = [];
|
|
46
|
-
|
|
47
45
|
if ( rootPackageJson ) {
|
|
48
46
|
validateRootPackage( rootPackageJson );
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
await processRootPackage( {
|
|
51
49
|
cwd,
|
|
52
50
|
rootPackageJson,
|
|
53
51
|
outputDirectoryPath
|
|
54
52
|
} );
|
|
55
|
-
|
|
56
|
-
copyPromises.push( ...copyRootItemsPromises );
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
if ( packagesDirectory ) {
|
|
60
|
-
|
|
56
|
+
await processMonorepoPackages( {
|
|
61
57
|
cwd,
|
|
62
58
|
packagesDirectory,
|
|
63
59
|
packagesToCopy,
|
|
64
60
|
outputDirectoryPath
|
|
65
61
|
} );
|
|
66
|
-
|
|
67
|
-
copyPromises.push( ...copyPackagesPromises );
|
|
68
62
|
}
|
|
69
63
|
|
|
70
|
-
return Promise.
|
|
64
|
+
return Promise.resolve();
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
/**
|
|
@@ -90,7 +84,7 @@ function validateRootPackage( packageJson ) {
|
|
|
90
84
|
* @param {string} options.cwd
|
|
91
85
|
* @param {RootPackageJson} options.rootPackageJson
|
|
92
86
|
* @param {string} options.outputDirectoryPath
|
|
93
|
-
* @returns {Promise}
|
|
87
|
+
* @returns {Promise.<void>}
|
|
94
88
|
*/
|
|
95
89
|
async function processRootPackage( { cwd, rootPackageJson, outputDirectoryPath } ) {
|
|
96
90
|
const rootPackageDirName = rootPackageJson.name.replace( /^@.*\//, '' );
|
|
@@ -100,13 +94,16 @@ async function processRootPackage( { cwd, rootPackageJson, outputDirectoryPath }
|
|
|
100
94
|
await fs.mkdir( rootPackageOutputPath, { recursive: true } );
|
|
101
95
|
await fs.writeFile( pkgJsonOutputPath, JSON.stringify( rootPackageJson, null, 2 ) + '\n' );
|
|
102
96
|
|
|
103
|
-
|
|
104
|
-
.map( absoluteFilePath => {
|
|
105
|
-
const relativeFilePath = upath.relative( cwd, absoluteFilePath );
|
|
106
|
-
const absoluteFileOutputPath = upath.join( rootPackageOutputPath, relativeFilePath );
|
|
97
|
+
const filesToCopy = await glob( rootPackageJson.files, { cwd, absolute: true } );
|
|
107
98
|
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
for ( const absoluteFilePath of filesToCopy ) {
|
|
100
|
+
const relativeFilePath = upath.relative( cwd, absoluteFilePath );
|
|
101
|
+
const absoluteFileOutputPath = upath.join( rootPackageOutputPath, relativeFilePath );
|
|
102
|
+
|
|
103
|
+
await fs.cp( absoluteFilePath, absoluteFileOutputPath, { recursive: true } );
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return Promise.resolve();
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
/**
|
|
@@ -115,29 +112,31 @@ async function processRootPackage( { cwd, rootPackageJson, outputDirectoryPath }
|
|
|
115
112
|
* @param {string} options.packagesDirectory
|
|
116
113
|
* @param {string} options.outputDirectoryPath
|
|
117
114
|
* @param {Array.<string>} [options.packagesToCopy]
|
|
118
|
-
* @returns {Promise}
|
|
115
|
+
* @returns {Promise.<void>}
|
|
119
116
|
*/
|
|
120
117
|
async function processMonorepoPackages( { cwd, packagesDirectory, packagesToCopy, outputDirectoryPath } ) {
|
|
121
118
|
const packagesDirectoryPath = upath.join( cwd, packagesDirectory );
|
|
122
119
|
const packageDirs = packagesToCopy || await fs.readdir( packagesDirectoryPath );
|
|
123
120
|
|
|
124
|
-
|
|
121
|
+
for ( const packageDir of packageDirs ) {
|
|
125
122
|
const packagePath = upath.join( packagesDirectoryPath, packageDir );
|
|
126
123
|
const isDir = ( await fs.lstat( packagePath ) ).isDirectory();
|
|
127
124
|
|
|
128
125
|
if ( !isDir ) {
|
|
129
|
-
|
|
126
|
+
continue;
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
const pkgJsonPath = upath.join( packagePath, 'package.json' );
|
|
133
130
|
const hasPkgJson = await fs.access( pkgJsonPath ).then( () => true, () => false );
|
|
134
131
|
|
|
135
132
|
if ( !hasPkgJson ) {
|
|
136
|
-
|
|
133
|
+
continue;
|
|
137
134
|
}
|
|
138
135
|
|
|
139
|
-
|
|
140
|
-
}
|
|
136
|
+
await fs.cp( packagePath, upath.join( outputDirectoryPath, packageDir ), { recursive: true } );
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return Promise.resolve();
|
|
141
140
|
}
|
|
142
141
|
|
|
143
142
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import upath from 'upath';
|
|
7
|
-
import fs from 'fs/promises';
|
|
7
|
+
import fs from 'node:fs/promises';
|
|
8
8
|
import assertNpmAuthorization from '../utils/assertnpmauthorization.js';
|
|
9
9
|
import assertPackages from '../utils/assertpackages.js';
|
|
10
10
|
import assertNpmTag from '../utils/assertnpmtag.js';
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { tools } from '@ckeditor/ckeditor5-dev-utils';
|
|
9
|
-
import { styleText, promisify } from 'util';
|
|
9
|
+
import { styleText, promisify } from 'node:util';
|
|
10
10
|
import columns from 'cli-columns';
|
|
11
11
|
import shellEscape from 'shell-escape';
|
|
12
12
|
import assertNpmAuthorization from '../utils/assertnpmauthorization.js';
|
|
13
|
-
import { exec } from 'child_process';
|
|
13
|
+
import { exec } from 'node:child_process';
|
|
14
14
|
|
|
15
15
|
const execPromise = promisify( exec );
|
|
16
16
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import crypto from 'crypto';
|
|
6
|
+
import crypto from 'node:crypto';
|
|
7
7
|
import upath from 'upath';
|
|
8
|
-
import os from 'os';
|
|
9
|
-
import fs from 'fs/promises';
|
|
10
|
-
import { Worker } from 'worker_threads';
|
|
8
|
+
import os from 'node:os';
|
|
9
|
+
import fs from 'node:fs/promises';
|
|
10
|
+
import { Worker } from 'node:worker_threads';
|
|
11
11
|
import { registerAbortController, deregisterAbortController } from './abortcontroller.js';
|
|
12
12
|
import { workspaces } from '@ckeditor/ckeditor5-dev-utils';
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
// This file is covered by the "executeInParallel() - integration" test cases.
|
|
7
7
|
|
|
8
|
-
import { parentPort, workerData } from 'worker_threads';
|
|
8
|
+
import { parentPort, workerData } from 'node:worker_threads';
|
|
9
9
|
|
|
10
10
|
// Required due to top-level await.
|
|
11
11
|
( async () => {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export default async function publishPackageOnNpmCallback( packagePath, taskOptions ) {
|
|
15
15
|
const { tools } = await import( '@ckeditor/ckeditor5-dev-utils' );
|
|
16
|
-
const { rm } = await import( 'fs/promises' );
|
|
16
|
+
const { rm } = await import( 'node:fs/promises' );
|
|
17
17
|
|
|
18
18
|
try {
|
|
19
19
|
await tools.shExec( `npm publish --access=public --tag ${ taskOptions.npmTag }`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-dev-release-tools",
|
|
3
|
-
"version": "54.2.
|
|
3
|
+
"version": "54.2.3",
|
|
4
4
|
"description": "Tools used for releasing CKEditor 5 and related packages.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lib"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ckeditor/ckeditor5-dev-utils": "^54.2.
|
|
25
|
+
"@ckeditor/ckeditor5-dev-utils": "^54.2.3",
|
|
26
26
|
"@octokit/rest": "^22.0.0",
|
|
27
27
|
"cli-columns": "^4.0.0",
|
|
28
28
|
"glob": "^13.0.0",
|