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

chore(DX): speed up publishing libs to verdaccio in schematics/testing.ts - publish in parallel #19991

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Platonn
Copy link
Contributor

@Platonn Platonn commented Feb 13, 2025

Speeds up the process of publishing libs to verdaccio. On my machine 80% - went down from 35s to 7s. Especially useful, when rerunning it tens/hundreads of times a day, while re-publishing and testing improved libs multiple times.

Details:

  • The outputs of each publishing command are not flushed immediately (to not interlace), but stored. They are flushed to terminal all together only when all publishing commands are completed (successful or not).
  • In the meantime only the progress is reported (i.e. [1/n] + name of the published libs + success/error status)

btw. improved the voice-notify functionality to send a notification also when an action fails


QA steps:

  1. build libs: npm run build:libs
  2. run schematics testing tool: npx ts-node tools/schematics/testing.ts
  3. choose Publish and hit enter
  4. verify the progress is displayed
    image
  5. verify the final message is displayed:
    image
  6. simulate an error: please remove the property "version" from the file projects/schematics/package.json
    image
  7. choose Publish and hit enter again
  8. verify that an error is displayed:
    image

@Platonn Platonn changed the title chore(schematics/testing.ts): publish libs to verdaccio in parallel chore(DX): speed up publishing libs to verdaccio in schematics/testing.ts - publish in parallel Feb 13, 2025
@Platonn Platonn marked this pull request as ready for review February 13, 2025 15:25
@Platonn Platonn requested a review from a team as a code owner February 13, 2025 15:25
@github-actions github-actions bot marked this pull request as draft February 13, 2025 15:26
);
const directory = path.dirname(packagePath);
const command = `cd ${directory} && npm publish --registry=${verdaccioRegistryUrl} --no-git-tag-version --color always`;
exec(command, {}, (error, stdout, stderr) => {

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium test

This shell command depends on an uncontrolled
file name
.
@pawelfras pawelfras marked this pull request as ready for review February 14, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants