To enable extenders to have the exact API's specific to Zowe Explorer available at compile time we should publish the API separately from Zowe Explorer as an npm package that will be a dev dependency of both the extender package and Zowe Explorer.
Put simply ZoweExplorerApiRegister which contains the alternative primary profile methods and ZoweExplorerExtender generic methods to be moved into a new npm package.
Hi,
It'd make developing really easy if the NPM package could be published to https://npmjs.org ( the public npm repository).
Thanks
Hi,
It'd make developing really easy if the NPM package could be published to https://npmjs.org ( the public npm repository).Thanks
Exactly.
I wonder if this could allow a "Zowe CLI" plugin to easily support either "ZOSMF" or "RSE" connections more easily
I wonder if this could allow a "Zowe CLI" plugin to easily support either "ZOSMF" or "RSE" connections more easily
It may help, however there may be more work involved if the desire is to decouple/detach the Zowe CLI from ZOSMF
I think this would be great for extenders and for us to govern API changes.
We could turn our current git repo into a monorepo that contains explorer, api, and even perhaps the ftp extension that I am trying to donate as separate package. Similar to how the Theia team organizes their components we could build the whole thing with https://lerna.js.org
The code layout would be then more like
\--packages
|--- api
|-- package.json
|-- src
|-- ..
|--- explorer
|-- package.json
|-- src
|-- ..
|+-- ftp
\-- package.json
\-- lerna.json
Building this would create the npm package for the api, and the two vsix files.
Topics (in this issue):
About number #1, I fully support splitting the API Register functions as well as some interfaces we have already defined in the Zowe Explorer out to a separate repo and published into public NPM. Then importing these as dependencies of the Zowe Explorer as well as other Extensions currently dependent on the Zowe Explorer.
About number #2, even though it's technically possible, there are a few other barriers we may need to overcome if we want the Zowe CLI to be able to support IBM RSE in its native APIs.
About number #3, I'd like others to comment since I've already made a few comments on previous occasion or email threads 馃構
TL;DR: about my comments related #3: Even though it is possible and has worked for other projects, I see too many challenges that we (as the community) will need to overcome and extra cycles that we need to spend in order to go monorepo (if that ends up being the final decision) that could be better utilized in adding more functionality for our users.
TL;DR: about my comments related
#3: Even though it is possible and has worked for other projects, I see too many challenges that we (as the community) will need to overcome
Hi again.
About #3: Mono-repo
Even though there may be challenges, I can see the benefits in keeping the NPM package in this repo and publishing it as a separate package. (maybe not the FTP extension though) 馃構
Thanks @Alexandru-Dumitru @Pranay154 @lauren-li @phaumer for joining in the discussion!
If I can quickly summarise the pros and cons:
npm does not support worspaces, but it is on their roadmap.
- Cons: An investment has to be made into proper tooling and the team has to learn new concepts. The most challenging part in my opinion is having an efficient build and pipeline. Because our projects are in TypeScript, yarn workspaces are the natural first step. At the moment
npmdoes not support worspaces, but it is on their roadmap.
Curious if Lerna has been investigated? Don't have experience with it, but seems like another popular option for managing monorepos (23k stars on GitHub).
Lerna can actually use yarn workspaces under the hood. So we can adopt it when we feel the need. But I think for our purposes lerna is an overkill.
Assuming we want to stick with npm, I see that learn can take care of important tasks such as keeping shared dependencies on the top-level node_modules only one, keeping versions in-sync etc.
One reason why I think we should try sticking with npm is that the vast majority of developers do not have to learn yarn as a new tool. Only the few people who maintain the overall repo need to learn lerna.
Most helpful comment
If I can quickly summarise the pros and cons:
npmdoes not support worspaces, but it is on their roadmap.