Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust releasing scripts to handle changes related to DLL #8616

Closed
pomek opened this issue Dec 9, 2020 · 2 comments · Fixed by ckeditor/ckeditor5-dev#682
Closed

Adjust releasing scripts to handle changes related to DLL #8616

pomek opened this issue Dec 9, 2020 · 2 comments · Fixed by ckeditor/ckeditor5-dev#682
Assignees
Labels
domain:extending-builds package:dev squad:devops Issue to be handled by the Devops team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@pomek
Copy link
Member

pomek commented Dec 9, 2020

Provide a description of the task

As for now, the ckeditor5 package is empty on npm.

After closing #8395, we will have some source code in the package that should be released on npm.

We need to figure out what we would like to release and how much work it requires from us.

@pomek pomek added type:task This issue reports a chore (non-production change) and other types of "todos". squad:devops Issue to be handled by the Devops team. package:dev domain:extending-builds labels Dec 9, 2020
@pomek pomek added this to the iteration 39 milestone Dec 9, 2020
@pomek pomek self-assigned this Dec 9, 2020
@pomek
Copy link
Member Author

pomek commented Dec 9, 2020

The releaseSubRepositories() function that we use for releasing packages allows defining empty releases. It means the published package will not contain any source code. See: https://unpkg.com/browse/ckeditor5@23.1.0/.

How it looks now in the code:

emptyReleases: [
'ckeditor5'
],
packageJsonForEmptyReleases: {
ckeditor5: {
description: 'A set of ready-to-use rich text editors created with a powerful framework. Made with real-time collaborative editing in mind.'
}
},

In fact, the description property in the source code is other than the published on npm:

GitHub npm
ckeditor5/package.json#L4 ckeditor5@23.1.0/package.json

We could improve the function by renaming the *empty* options to *custom*. Also, by adding a new option (customReleasesFiles), we could define which files and directories should be copied from the source packages.

One more thing. As for now, the published ckeditor5 package does not define any dependencies.

After introducing DLLs, the "core" packages should be added as dependencies.

const ckeditor5Dependencies = {};

// Some operations on FS that will extract required packages and add those into `ckeditor5Dependencies` object.

require( '@ckeditor/ckeditor5-dev-env' )
	.releaseSubRepositories( {
		cwd: process.cwd(),
		packages: 'packages',
		customReleases: [ // Renamed from `emptyReleases`. It is an array of packages that should be modified before publishing.
			'ckeditor5'
		],
		packageJsonForCustomReleases: { // An object that modifies the `package.json` for each package. 
			ckeditor5: {
				dependencies: ckeditor5Dependencies
			}
		},
		customReleasesFiles: {
			ckeditor5: [ // An array of glob patterns. Files that match to those patterns will be released.
				'src/*.js', // All JS files from the `src/` directory.
				'dist/**' // Everything from the `dist/` directory.
			]
		},
		dryRun: process.argv.includes( '--dry-run' )
	} );

@jodator
Copy link
Contributor

jodator commented Dec 11, 2020

Related (build process): #8593.

mlewand added a commit to ckeditor/ckeditor5-dev that referenced this issue Dec 15, 2020
… "customReleases" that allows specifying which files from the original package should be copied. Introduced the `customReleasesFiles` option for the `releaseSubRepositories()` function. It allows specifying glob patterns of files that should be copied to the temporary directory from which the package will be published on npm. Closes [ckeditor/ckeditor5#8616](ckeditor/ckeditor5#8616).


MAJOR BREAKING CHANGE (env): Renamed `options.packageJsonForEmptyReleases` to `options.packageJsonForCustomReleases` in the `releaseSubRepositories()` function.

MAJOR BREAKING CHANGE (env): Renamed `options.emptyReleases` to `options.customReleases` in the `releaseSubRepositories()` function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:extending-builds package:dev squad:devops Issue to be handled by the Devops team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants