-
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
Build Related : rename constants.json to constants.js #11292
Conversation
Running a single test works gulp test --file "test/spec/modules/yieldoneBidAdapter_spec.js" --nolint running all tests, it fails. yyyyyyyyyyyyyy .... @dgirardi help plz |
src/constants.js
Outdated
@@ -0,0 +1,196 @@ | |||
export default { |
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 think this is the same as JSON for the minifier. It wouldn't be able to remove dead definitions; I'm curious and I'd bet it also wouldn't fix the problem you were having.
If it doesn't, what we want is
export const EVENTS = {...};
export const TARGETING_KEYS = {...};
...
or even better would be
export const EVENT_AUCTION_INIT = 'auctionInit';
...
export const TARGETING_KEY_BIDDER = 'hb_bidder';
...
but of course the latter is a lot more work. I'm sorry I didn't make this clearer earlier.
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.
No worries. The first one I'll definitely do.
The issue currently is that the minifier removes too much 😅
I found the issue why |
This is such a win for my current research, i think i could have branched from here and go fully on node. |
Awesome 🥳 Is there anything I can do to push this? Otherwise updating and resolving merge conflicts becomes cumbersome. And we hit yet another issue with a bidder that doesn't work since the PUC refactoren, which is probably caused by some webpack minification, trimming away actually required constants 🫠 |
Thanks @ChrisHuie |
* Fix lintWarnings gulp parameter * Fix prebid#10829 Rename constants.json to constant.js * Remove unnecessary quotes * Fix import in genericAnalyticsAdapter * remove unnecessary quotes * Change require to imports * Revert "Fix lintWarnings gulp parameter" This reverts commit e210f4e. * Add nolint and no-lint-warnings docs to README * WIP refactoring constants into separated exported files * Refactor the rest of imports * Fix invalid import * Add missing MESSAGSES import * Add missing S2S import * Fix broken constants.js import * Use proper events import in magnite adapter * Add import to pubmatic spec * Found another CONSTANTS import * Fix shadowed var * fix zeta global test * Add missing BID_STATUS import * Fix zeta global ssp analytics for real * fix lint error * Remove duplicated TARGETING_KEYS definition * Move FLOOR_SKIPPED_REASON into priceFloors.js * Remove unused CB constants * Move FLOOR_SKIPPED_REASON into pubmaticAnalyticsAdapter * Use proper import * Remove unused var and fix linting error
Type of change
Description of change
Rename
constants.json
toconstants.js
TODOs left
Other information
constants.json
#10829