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

Release tools: add a hook for modifying a package.json file before publishing it on npm #12038

Closed
pomek opened this issue Jul 11, 2022 · 2 comments · Fixed by ckeditor/ckeditor5-dev#777
Assignees
Labels
package:dev squad:platform Issue to be handled by the Platform team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@pomek
Copy link
Member

pomek commented Jul 11, 2022

Provide a description of the task

Story

  • Given: I am a developer who releases CKEditor 5 on npm.
  • When: I prepare a new release.
  • Then: The tools should detect a package written in TypeScript.
  • And: The tools should align a path specified under the #main key in a package.json file.

Background

  • Under the #main key, we keep a relative path to an entry point for a package.
  • For TypeScript packages, it points to a src/index.ts file.
  • We publish *.js files on npm. Hence, we need to modify the path (align an extension).

Hints

  • We don't want to commit this change. It should be visible only for packages published on npm.
  • We can add an optional callback executed for each package. It receives a JSON object representing the package.json structure.
  • We also need to revert this change. Hence, we need two callbacks: an update and a reversion.
@pomek pomek added type:task This issue reports a chore (non-production change) and other types of "todos". squad:platform Issue to be handled by the Platform team. labels Jul 11, 2022
@pomek pomek self-assigned this Jul 11, 2022
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 11, 2022
@pomek

This comment was marked as spam.

@pomek

This comment was marked as spam.

@CKEditorBot CKEditorBot added status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. and removed status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. labels Jul 11, 2022
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. labels Jul 13, 2022
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Jul 18, 2022
pomek added a commit to ckeditor/ckeditor5-dev that referenced this issue Jul 19, 2022
Other (env): Renaming the entry point extension from ".ts" to ".js" in the `main` field in the `package.json` files for each package written in TypeScript before the package is published to npm. After publishing, the original extension is restored. Closes ckeditor/ckeditor5#12038.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 19, 2022
@CKEditorBot CKEditorBot added this to the iteration 55 milestone Jul 19, 2022
@pomek pomek removed their assignment Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:dev squad:platform Issue to be handled by the Platform 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.

3 participants