-
Notifications
You must be signed in to change notification settings - Fork 67
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
Next steps for JS Toolkit and target platforms #740
Comments
Point 2
The list of available target platforms spans to the first The list of tags in github follows:
In addition to this we would have to add DXP versions and branches. So, obviously, we don't want to publish so many packages to npmjs.com unless absolutely needed. Most probably, we may do with one package per major version, then we release new versions whenever:
So, for example, a possible series of versions for package
As long as we don't branch version releases, this would suffice, I think. Ideally, we would also compile a table (in the wiki of this project, for example) to track npm version numbers and portal versions. I don't know what is the release cycle of DXP, but we may do something similar using a different package name (for example: If anyone can think of any scheme, I'm very open to hear it. Thinks that come to mind are, for example, using npm dist-tags to alias version numbers (in the above example, we may define a dist-tag |
I typically like to go for simple and small first, so I like your idea of starting with one version per major release. For future versions and updates I think we can possibly utilize the version of the npm package as well but maybe we wait and see what the updates for the target platform would actually look like. Overall though, this plan moving forward looks good to me. |
Mmm, I'm now seeing I got it wrong... Where it says:
It should be:
Also, I've realized that this schema will never be able to honor semantic versioning as required by This can be fixed by using the major/minor version to point to different Liferay
I still have doubts if we should map the major version number to GAs, or the minor one. Also, I'm not sure if this type of issue may also appear in more scenarios (I'm thinking about hot fixes, or any deviation from the usual versioning branches in Liferay Portal) 🤔 . |
I don't know if we can follow semver exactly if we are publishing a platform for every major dxp release, but I think we can get close. My "Alt NPM" one I think is closest to your last example and I think it makes sense to me. I'm sure we might run into issues in some weird edge case, but its likely because DXP breaks some versioning rule.
Internal fixes:
|
Yeah, that will leave more room for internal management (two numbers instead of one). I think this is the best to start with 👍 . |
I'll begin analyzing point 3 now: how to create the platforms. I already have a script for the latest versions but it needs a local copy of liferay-portal pointing to the desired tag. I doubt it will be future-proof as it needs to inspect I will begin by tweaking it for older versions (7.3, 7.2, and so on, and see what happens 🤞 ). |
Point 3
|
As show in the create-platform script the only thing we need to grab from any That information is inside the global I'm gonna check if there's any way to derive the list of bundler-exports from |
So, I have created target platforms for all I would say we don't need a formal release process like we do with other packages, just a
Related to 1, should we need branching, we could create proper git branches in the repo, or simply stack commits unsorted. I would say we don't need branches because they would pollute this repo a lot for very little benefit. And, for the reasons stated above, a stack of unsorted commits will probably be enough. Graphically, we could have something like this: $ git log
feat(portal-7.4): add 7.4.3.4-ga4 version # npm 4.0.0
feat(portal-7.4): add 7.4.2-ga3 version # npm 3.0.0
feat(portal-7.4): fix 7.4.1-ga2 version # npm 2.0.1
feat(portal-7.4): fix 7.4.0-ga1 version # npm 1.0.1
feat(portal-7.4): add 7.4.1-ga2 version # npm 2.0.0
feat(portal-7.4): add 7.4.0-ga1 version # npm 1.0.0 So, every time we need to fix anything (will happen rarely) we will pile a stack of commit for all released versions to the date with the fixes on top of the history. This will leave the HEAD always pointing to the very highest released version, which is something good.. |
I definitely prefer a stack of commits instead of multiple branches. I think we can just try this simplest approach first and see how it goes. If we need to pivot at a later date and move to branches or something else, we can always do so. |
One thought I just had. Do we want to set up some sort of automation for releases since we now have this 2-week release cycle? I imagine it being a headache to manually do every 2 weeks. |
Yes, I'm waiting to see what we really need, but it's definitely something that needs automation because otherwise it will be a nightmare 😱 . Maybe we can create a script and associate it to a github action, so that it can be run from GH's UI by anyone with permissions... |
@izaera I like that idea of creating a script that we can execute with a click from github. I don't know if we can jump to full automation yet since the 2 week release is still pretty new, but if we can reduce the amount of manual steps, that would be great. |
Point 8We should provide some way to migrate old projects based on Also, we have not ported the Same happens for the Possible solutions to this:
I would like to know what you think about this @nhpatt @dsanz @bryceosterhaus ... |
Regarding the automatic upgrade of projects based on I'm going to implement this automatic -limited- process with the things I know that need be migrated, then, when we decide what to do with I'm starting to convince myself that 2 (above) is the most reasonable option. It doesn't abandon current users and, at the same time, doesn't make us pay a toll later for having included those features in target platforms again. |
Do we have any metrics on people who use This thought also makes me wonder about metrics for our tooling... I seems like we often ask "does anyone use this?" and we might want to start considering to add some analytics in our tooling so that we can see just how many people use our tooling and what features they use. I'm sure react-scripts has something like this that we could learn from, and since everyone is rightly concerned about privacy, we should provide an opt-out. We can open a new issue for this idea of analytics and metrics. |
Nope. We don't have metrics for anything :-(, just the communications I make with some users.
OK, let's do this: in the upgrade process I will drop them and tell the user about it so that, if it is really needed, they can contact us and we may provide 2. Providing 2 should be more or less straightforward as it is just a matter of packaging what we have in In case the user cannot drop the feature for any reason, they can always choose not to upgrade, contact us, and wait for the implementation, then upgrade. I mean, they don't need to upgrade if they don't want to. It's only that we encourage people to follow the new path, but don't make it mandatory for now.
The tool had metrics and we even have a user in google analytics to access them. However, to exploit and maintain those metrics we need more resources (people) because it's a time consuming task. As I was almost alone and nobody took advantage of the metrics I deactivated them long ago. But we can resurrect them if we see it fits. The code is there and it worked. |
I'd be curious to just get an idea of what tasks people use and how many people are using them. Not super important, but it is a nice to have.
Sounds good to me! |
This issue gathers the following steps we need to follow to replace the old Liferay JS Toolkit Yeoman generator by our new
@liferay/cli
tool so that we can progress in our migration from the old JS Toolkit repo to the new one, then evolve theliferay-npm-bundler
from an AMD architecture to -hopefully- a browser modules one.Current status
✅ We have already merged the necessary target platforms to cover the previous functionality provided by liferay-npm-build-support.
✅ We have also merged a functional
@liferay/cli
that can completely replace the old Yeoman generator.✅ Our documentation still points to the old artifacts.
✅ We still need to release some artifacts to the public npm registry.
Following steps
Sorted by the order we should follow when making them happen:
portal-adapt-*
platforms so that old projects can continue working.@liferay/cli
with the published platforms. (feat(liferay-cli): add new published target platforms #756)liferay-npm-build-support
totarget-platforms
liferay update-project
to update old yeoman-based projects #763@liferay/cli
https://github.com/liferay/liferay-frontend-projects/releases/tag/liferay-cli%2Fv1.0.0@liferay/cli
feat(generator-liferay-js): encourage users to use @liferay/cli #771Add a message inliferay-npm-build-support
to encourage users to migrate totarget-platforms
.Publish the lastDeprecate liferay-npm-build-support in npmjs.comliferay-npm-build-support
version.Freeze/removeThis will be a formal freeze for now, there's no real need to remove anything from GitHub yet.liferay-npm-build-support
andgenerator-liferay-js
source code.liferay-npm-bundler
v3.The text was updated successfully, but these errors were encountered: