Skip to content

Conversation

@wincent
Copy link
Contributor

@wincent wincent commented Oct 13, 2020

@wincent
Copy link
Contributor Author

wincent commented Oct 13, 2020

@izaera: This is the most complicated/risky one of the lot so I'd appreciate it if you could look over it with your 🦅 👀 — The others were more of a mechanical thing, but in this one there are quite a few interdependencies... eg.

  • Places where the code still refers to v2.x of liferay-npm-bundler, and so I didn't change those... vs...
  • Places where it seemed straightforwardly obvious and appropriate to update to switch to the namespaced @liferay/npm-bundler...

And then there are lots of references sprinkled through here to packages from v2.x of the toolkit that were never on the 3.x-WIP branch in the other repo, and it's not clear to me whether they will ever be ported, or whether the references themselves should just be removed (basically, stuff I found via git grep liferay-npm-bundler eg. presets and plugins).

@wincent wincent changed the base branch from master to wincent/scope/npm-bridge-generator October 13, 2020 17:03
@izaera
Copy link
Member

izaera commented Oct 14, 2020

The "problem" is that the generator in 3.x-WIP has not been migrated yet, it's just a copy of the one in master. That is why it refers to 2.x versions.

I wouldn't bother too much in migrating it, as it will need a rewrite because the structure of the projects has changed. So I guess you may leave it in any state that doesn't break the CI.

Regarding the bridge generator it is also the same as in 2.x and it probably won't need to be changed, as it works the same for 3.x.

Finally the js-toolkit-scripts should disappear too, as everything done there will be done inside bundler 3, so nothing will be modular as in 2.x.

To sum up, the final bundler 3 should have:

  1. toolkit-core: a library with all utilities to deal with files, transformations, project inspection, etc. It should also be used (in the final image) by other projects, like the Themes Toolkit, for example. It could even be used by third party tools like the Fragments CLI or anything that any customer/partner develops. In other words: it is our programmatic API.
  2. bundler: relies on toolkit-core to bundle JS projects
  3. generator: generates projects that are built by bundler
  4. bridge generator (perhaps): we need this tool for backwards compatibility in the portal, but we will remove/deprecate it as soon as we don't need it any more

@wincent
Copy link
Contributor Author

wincent commented Oct 14, 2020

Thanks @izaera. As per Slack discussion, as long as CI is green (it is), we're just going to cut some prereleases and see if everything works.

The important bits to get right are the bundler and the toolkit core (used by the bundler). They are used in about three places in DXP so we can test all of those.

Known issue: QA script doesn't work in v3 (because the generator isn't really migrated, like Iván said above).

@wincent wincent force-pushed the wincent/scope/npm-bridge-generator branch from 2fa2a68 to 9999fc4 Compare October 14, 2020 10:31
Base automatically changed from wincent/scope/npm-bridge-generator to master October 14, 2020 10:37
@wincent
Copy link
Contributor Author

wincent commented Oct 14, 2020

Rebasing this one now.

@wincent wincent force-pushed the wincent/scope/npm-bundler branch from aa97e42 to 0eb88ce Compare October 14, 2020 10:51
@wincent wincent marked this pull request as ready for review October 14, 2020 10:52
@wincent
Copy link
Contributor Author

wincent commented Oct 14, 2020

It's green so it obviously works. Without a doubt. Guaranteed!

@wincent wincent merged commit 06e047c into master Oct 14, 2020
@wincent wincent deleted the wincent/scope/npm-bundler branch October 14, 2020 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants