| Summary: | Update RequireJS to 2.1.15 | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Client | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 7.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
Opened CQ here: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=8944 The CQ has been approved. However I found some issues when running Orion under RequireJS 2.1.15 that need to be resolved before I can merge the new version into master. RequireJS 2.1.15 has been merged: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=43e345c http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=211c46d These were impacted by the upgrade: - ESLint loader config in the JS plugin - OrionHome calculation in PageLinks.js For posterity, here are the old (and apparently incorrect) ways we used to calculate the OrionHome variable in previous versions of RequireJS: > // RequireJS 1.x: > // return new URL(require.toUrl("."), window.location).href.slice(0,-1); > > // RequireJS 2.1.5: > // return new URL(require.toUrl("orion/../"), window.location.href).href.slice(0, -1); We now do this, which (I hope) is less likely to break in future releases. > // RequireJS 2.1.15: > var orionSrcURL = new URL(require.toUrl("orion/"), window.location.href); //$NON-NLS-0$ > return new URL("../", orionSrcURL).href.slice(0, -1); //$NON-NLS-0$ |