@guardian/commercial-core 4.3.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ declare class AdSize extends Array<number> {
25
25
  get height(): number;
26
26
  }
27
27
  declare type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'skyscraper';
28
- declare type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky';
28
+ declare type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky' | 'crossword-banner';
29
29
  declare type Breakpoint = 'mobile' | 'desktop' | 'phablet' | 'tablet';
30
30
  declare type SizeMapping = Partial<Record<Breakpoint, AdSize[]>>;
31
31
  declare type SlotSizeMappings = Record<SlotName, SizeMapping>;
@@ -243,6 +243,10 @@ const slotSizeMappings = {
243
243
  'mobile-sticky': {
244
244
  mobile: [adSizes.mobilesticky],
245
245
  },
246
+ 'crossword-banner': {
247
+ tablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
248
+ phablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
249
+ },
246
250
  };
247
251
  exports.slotSizeMappings = slotSizeMappings;
248
252
  const getAdSize = (size) => adSizes[size];
@@ -25,7 +25,7 @@ declare class AdSize extends Array<number> {
25
25
  get height(): number;
26
26
  }
27
27
  declare type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'skyscraper';
28
- declare type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky';
28
+ declare type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky' | 'crossword-banner';
29
29
  declare type Breakpoint = 'mobile' | 'desktop' | 'phablet' | 'tablet';
30
30
  declare type SizeMapping = Partial<Record<Breakpoint, AdSize[]>>;
31
31
  declare type SlotSizeMappings = Record<SlotName, SizeMapping>;
@@ -238,6 +238,10 @@ const slotSizeMappings = {
238
238
  'mobile-sticky': {
239
239
  mobile: [adSizes.mobilesticky],
240
240
  },
241
+ 'crossword-banner': {
242
+ tablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
243
+ phablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
244
+ },
241
245
  };
242
246
  const getAdSize = (size) => adSizes[size];
243
247
  // Export for testing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/commercial-core",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "Guardian advertising business logic",
5
5
  "homepage": "https://github.com/guardian/commercial-core#readme",
6
6
  "bugs": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "prettier": "@guardian/prettier",
44
44
  "devDependencies": {
45
- "@commitlint/cli": "^16.1.0",
45
+ "@commitlint/cli": "^17.0.3",
46
46
  "@commitlint/config-conventional": "^17.0.0",
47
47
  "@guardian/ab-core": "^2.0.0",
48
48
  "@guardian/consent-management-platform": "^10.6.0",
@@ -67,7 +67,7 @@
67
67
  "eslint-plugin-prettier": "^4.0.0",
68
68
  "husky": "^8.0.1",
69
69
  "jest": "^27.4.1",
70
- "lint-staged": "^12.1.2",
70
+ "lint-staged": "^13.0.3",
71
71
  "mockdate": "^3.0.5",
72
72
  "npm-run-all": "^4.1.5",
73
73
  "prettier": "^2.5.0",