Fix review issues from automated code review
- Rename MAX_RETRIES to MAX_ATTEMPTS (3 total) to fix misleading naming - Skip retry loop on caller-initiated aborts so explicit cancellations terminate immediately - Preserve original script type via data-type attribute instead of always forcing text/javascript - Recreate MutationObserver when consent changes so newly added elements use fresh consent data - Fix package.json exports: point main at ESM bundle and add proper exports map with IIFE as separate entry Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -3,9 +3,17 @@
|
||||
"version": "0.0.0",
|
||||
"description": "Probo cookie consent banner SDK",
|
||||
"type": "module",
|
||||
"main": "dist/cookie-banner.iife.js",
|
||||
"main": "dist/cookie-banner.mjs",
|
||||
"module": "dist/cookie-banner.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/cookie-banner.mjs",
|
||||
"default": "./dist/cookie-banner.mjs"
|
||||
},
|
||||
"./iife": "./dist/cookie-banner.iife.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build.mjs && tsc --emitDeclarationOnly",
|
||||
"check": "tsc --noEmit"
|
||||
|
||||
Reference in New Issue
Block a user