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

Research ways of using ESM dependencies in the CLI #4306

Closed
waldekmastykarz opened this issue Jan 2, 2023 · 2 comments
Closed

Research ways of using ESM dependencies in the CLI #4306

waldekmastykarz opened this issue Jan 2, 2023 · 2 comments
Assignees
Milestone

Comments

@waldekmastykarz
Copy link
Member

waldekmastykarz commented Jan 2, 2023

We have several dependencies that in the latest major version have been migrated to ES modules. That means that most likely the CJS versions will no longer be maintained. To avoid depending on stale packages, we should research what's the best way forward. Here are some options:

  • not do anything. As long as there are no issues with the dependencies that we use, there's no reason for us to worry about upgrading to newer versions. It does mean that we need to pay more attention to future versions and track if there's nothing that would require us to take some action after all
  • find alternative packages that are available as CJS. This would likely mean refactoring our code that depends on those packages. If ESM is the way to go, we might end up in the same situation after all
  • migrate CLI to use ESM instead of CJS. Upgrade packages to the latest ESM versions. What about dependencies that are CJS: can we keep using them or do we need to find ESM alternatives for them?

If we choose to change our package format, let's keep in mind that we expose a public API and which ideally should stay backwards compatible.

Are there any other options that you see and which we should consider @pnp/cli-for-microsoft-365-maintainers? If not, the next step would be to research the viability of these options and their trade-offs.

@waldekmastykarz
Copy link
Member Author

I took a look at moving the CLI to esm. Here's what I've got so far: https://github.com/waldekmastykarz/cli-microsoft365/tree/esm. It's a fairly big refactoring and I'd appreciate it if you could have a look if everything's working as intended (tests + coverage are 100% and I tried a couple commands) before we proceed @pnp/cli-for-microsoft-365-maintainers.

@waldekmastykarz waldekmastykarz self-assigned this Jul 1, 2023
waldekmastykarz added a commit to waldekmastykarz/cli-microsoft365 that referenced this issue Jul 16, 2023
waldekmastykarz added a commit to waldekmastykarz/cli-microsoft365 that referenced this issue Aug 3, 2023
Adam-it pushed a commit that referenced this issue Aug 5, 2023
@Adam-it Adam-it added this to the v7 milestone Aug 5, 2023
@Adam-it
Copy link
Contributor

Adam-it commented Aug 5, 2023

✅👏🤩

@Adam-it Adam-it closed this as completed Aug 5, 2023
milanholemans pushed a commit that referenced this issue Aug 6, 2023
waldekmastykarz added a commit that referenced this issue Aug 12, 2023
milanholemans pushed a commit that referenced this issue Aug 12, 2023
Adam-it pushed a commit that referenced this issue Aug 16, 2023
Saurabh7019 pushed a commit to Saurabh7019/cli-microsoft365 that referenced this issue Aug 16, 2023
waldekmastykarz added a commit that referenced this issue Aug 19, 2023
Saurabh7019 pushed a commit to Saurabh7019/cli-microsoft365 that referenced this issue Aug 21, 2023
waldekmastykarz added a commit that referenced this issue Aug 26, 2023
Jwaegebaert pushed a commit that referenced this issue Aug 26, 2023
Saurabh7019 pushed a commit to Saurabh7019/cli-microsoft365 that referenced this issue Sep 5, 2023
Adam-it added a commit to Adam-it/cli-microsoft365 that referenced this issue Oct 8, 2023
Adam-it added a commit to Adam-it/cli-microsoft365 that referenced this issue Oct 9, 2023
Adam-it added a commit to Adam-it/cli-microsoft365 that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants