-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Lodash global template settings #2281
Copy link
Copy link
Closed
Labels
dependencyFor issues and PRs. Things that are related to one or more dependencies.For issues and PRs. Things that are related to one or more dependencies.type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
I got burned a few days ago while trying to do a sync() on my database and getting the error SyntaxError: Unexpected token = originating within lodash's .template function. It turns out and some other module in my project is altering lodash's global templateSettings.interpolate value and since Sequelize is utilizing the global lodash object it was wasn't able to parse templates with the default interpolate regex. I know this is the other library's fault at the end of the day but wouldn't it make sense within Sequelize to either pass default options to each call of .template(text, data, [options]) or perhaps instantiate a separate lodash object to Util._ instead of using the global singleton?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dependencyFor issues and PRs. Things that are related to one or more dependencies.For issues and PRs. Things that are related to one or more dependencies.type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type