liferay / liferay-frontend-projects

A monorepo containing assorted Frontend Infrastructure Team projects
Other
69 stars 68 forks source link

Change portal's react dependency to a placeholder string in fragment projects #458

Closed izaera closed 3 years ago

izaera commented 3 years ago

Issue type

Description

We had to rename the frontend-js-react-web project to@liferay/frontend-js-react-web because of a security vulnerability. That made React fragments fail because they were referring to the old location.

After discussing it with the Echo team, we decided to replace occurrences of 'frontend-js-react-web$react' in the fragments' source code by the new name. This is to avoid DB upgrade processes and/or fragment projects recompilation.

Related PR in liferay-portal.

Desired behavior: Because 'frontend-js-react-web$react' as a placeholder is a bit ugly, we will now support __PORTAL_REACT__ as the canonical form and will change the toolkit accordingly.

Repro instructions (if applicable): See LPS-129182 for a test scenario.

Other information (environment, versions etc):

izaera commented 3 years ago

Turns out this must be done in the fragments generator

izaera commented 3 years ago

Closing this since there's nothing to be done in this project.