[NPMCLI-145] Refactor code with Promises to avoid async issues Created: 16/Nov/17  Updated: 25/Mar/22

Status: Open
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Federico Grilli Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to NPMCLI-141 Investigate and fix cause for failing... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

There are some places in the CLI codebase where we should synchronise code execution (due to Node.js single-threaded, async nature), certain operations needing to be run only after others are done. This can be achieved either with callbacks or better with ES6 (latest Javascript) Promises.
Also check if latest Node.js supports ES6 natively or if we need to use a polyfill library like bluebird

First evaluate, and estimate how much work it would be to switch to promises. Discuss with PXM, and we'll decide whether to keep in v 3 release or postpone.


Generated at Mon Feb 12 04:46:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.