Closed Bug 1451342 Opened 7 years ago Closed 7 years ago

Unvendor ng-text-truncate-2

Categories

(Tree Management :: Perfherder, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

As part of bug 1376829 ng-text-truncate-2 was vendored into `ui/vendor/`, so it could be modified to export an AngularJS module in-line with the practices now used by other packages. However we've been slowing reducing the number of packages we have vendored in the repo, with the intention of removing that folder entirely soon (there is only one other package remaining there) - so I think it would be best to unvendor and pass the package name manually in `ui/js/perf.js` instead (which is the only difference the module export makes). Unvendored packages have the advantage of: * not causing noise in grep results * being updated automatically by Renovate / monitored by security vulnerability checking tools * making it easier to see what is first vs third party code
I needed to modify the code to make it actually work, there is no version of this package on npm that works properly out of the box. I didn't really want to get in the business of adding yet another fork of an abandoned package to npm, so here we are. I think we should just leave this as-is until we migrate this code to react, at which point we can either use a different package or just write the functionality ourselves.
The module export is a nice to have, but not required for the package to work (the module name can be passed as a string instead, like it was for all of our packages prior to bug 1441617).
(In reply to Ed Morley [:emorley] from comment #2) > The module export is a nice to have, but not required for the package to > work (the module name can be passed as a string instead, like it was for all > of our packages prior to bug 1441617). I tried this but couldn't get it to work. :( If you want to give it a go please feel free-- I know it sounds like I'm passing the buck but I honestly don't want to spend any more time on this package.
I'd already assigned the bug to me and have a PR about to submit :-)
Attachment #8964936 - Flags: review?(wlachance)
Component: Treeherder: Frontend → Perfherder
Comment on attachment 8964936 [details] [review] Link to GitHub pull-request: https://github.com/mozilla/treeherder/pull/3393 Awesome ty! :)
Attachment #8964936 - Flags: review?(wlachance) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/062317c8eec0338d60fcc09bffab1e10fe5e25b2 Bug 1451342 - Unvendor ng-text-truncate-2 (#3393) Since we've moving away from vendored packages. The only differences between the vendored file and that in the NPM package were the changes to `require('angular')` and export the created AngularJS module. However Angular is already imported prior to this package being imported, and we can just pass the module name as a string instead of relying on the export.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: