-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement/alias queue #1156
Improvement/alias queue #1156
Conversation
…example_gpt.html be unix-like, rather than windows-like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @dbemiller!
this isn't an alias, this is a replacement. |
ah whoops yep gotta add the alias too, can't break the api, nice catch @snapwich |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pbjs.que
needs to continue to work
Isn't the alias defined in |
won't work since all the operations have been renamed to operate on the operations should probably be unchanged to still operate on
|
forgot one thing... both |
Thanks guys. I didn't fully understand what the queue was trying to accomplish, before making those changes. I definitely don't intend to break backwards compatibility. The latest changes split |
src/prebid.js
Outdated
$$PREBID_GLOBAL$$.que[i].call(); | ||
$$PREBID_GLOBAL$$.que[i].called = true; | ||
if (deprecationWarning) { | ||
utils.logWarn('$$PREBID_GLOBAL$$.que.push is deprecated, to be removed in v1.0.0. Use $$PREBID_GLOBAL.queue.push instead.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to spam the console with deprecation warnings for all consumers of prebid.js. Probably should only display it once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit... I had kind of intended to spam them :p. The more annoying it is, the faster people will want to update their code ^^.
I must admit there's no substantive benefit, though. I pulled the warning out of the loop.
It is possible to just add an alias for |
So... it sounds like there are two issues here.
I'm very new to the project, so if I've missed decisions about [1], please point me to them. In isolation, though, I would argue for descriptive names in APIs for several reasons:
Let me know if you have more reasons than these... but the only benefits I can come up with in favor of shorter names are:
I definitely don't want to upset the project philosophy if you've already had this discussion... but in a vacuum, descriptive names have always seemed more beneficial to me. Truth be told, even
I simply don't know the Prebid community well enough yet to judge this, for such a small change. In general, though, API changes should be expected in a v0 project. |
@nanek |
As I mentioned in another thread, if we're going to make backwards-compatible breaking changes, I'd recommend |
We chatted a bit about it here and agreed that it was probably not a big enough API change to bother bugging publishers with deprecation warnings. So... this should be ready for another look now. |
@prebid/all-contributors
Use 👍 or 👎 in the following posts to vote. Thanks |
|
|
Looks like there's a pretty clear winner ^^. Renamed to cmd now. |
…built * 'master' of https://github.com/prebid/Prebid.js: (23 commits) Increment pre version Probed 0.24.0 Release Beachfront adapter - add ad unit size (prebid#1183) Thoughtleadr adapter - fix postMessage (prebid#1207) When prebid server issues a no-bid response, call addBidResponse for every adUnit requested (prebid#1204) Improvement/timeout xhr (prebid#1172) Add native support (prebid#1072) Improvement/alias queue (prebid#1156) Updated documentaion (prebid#1160) Improvement/prebid iframes amp pages (prebid#1119) Fixes prebid#1114 possible xss issue (prebid#1186) Allowed setTargetingForGPTAsync() to target specific ad unit codes. (prebid#1158) updated tag (prebid#1212) Common user-sync (prebid#1144) Rename secureCreatives file and lint (prebid#1203) HIRO Media: Remove batching mechanism and use AJAX instead of JSONP (prebid#1133) Add Support for DigiTrust in Rubicon Adapter (prebid#1201) Upgrade linters to ESLint with stricter code style (prebid#1111) Add dynamic bidfloor parameter to Smart Adserver Adapter (prebid#1194) Bug fix: bids served by secure creatives does not get pushed into _winningBids (prebid#1192) ...
….23.0 to aolgithub-master * commit '136fc37637749a764070c35c03e7e87a5c157947': (33 commits) Added changelog entry. Implemented passing key values feature. Update code to ESlint rules. Prebid 0.24.1 Release tests: drop ie9 browserstack test Audience Network: separate size from format (prebid#1218) Bugfix/target filtering api fix (prebid#1220) Map sponsor request param to endpoint param (prebid#1219) Increment pre version Probed 0.24.0 Release Beachfront adapter - add ad unit size (prebid#1183) Thoughtleadr adapter - fix postMessage (prebid#1207) When prebid server issues a no-bid response, call addBidResponse for every adUnit requested (prebid#1204) Improvement/timeout xhr (prebid#1172) Add native support (prebid#1072) Improvement/alias queue (prebid#1156) Updated documentaion (prebid#1160) Improvement/prebid iframes amp pages (prebid#1119) Fixes prebid#1114 possible xss issue (prebid#1186) Allowed setTargetingForGPTAsync() to target specific ad unit codes. (prebid#1158) ...
* Replaced que with queue. Made the line terminator characters in pbjs_example_gpt.html be unix-like, rather than windows-like. * Removed some redundant tests. * Separated que from queue, and added a deprecation warning. Wrote unit tests. * Limited the number of deprecation warnings to at most 2. * Style fixes. * Removed the deprecation warnings. * Renamed queue to cmd, per the github poll. * Fixed two more occurrences of outdated strings/comments.
Type of change
[x] Feature
Description of change
This fixes #1124 (Deprecate
que
in favor ofqueue
)