@graphcommerce/next-ui 9.1.0-canary.46 → 9.1.0-canary.48

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.48
4
+
5
+ ## 9.1.0-canary.47
6
+
7
+ ### Patch Changes
8
+
9
+ - [`4564271`](https://github.com/graphcommerce-org/graphcommerce/commit/4564271e702aab11c28e425029f4a7c09a4d5d61) - Created a revalidate method that returns a single value so that it can be overwritten centrally ([@paales](https://github.com/paales))
10
+
3
11
  ## 9.1.0-canary.46
4
12
 
5
13
  ## 9.1.0-canary.45
package/index.ts CHANGED
@@ -9,9 +9,10 @@ export * from './Blog/BlogTitle/BlogTitle'
9
9
  export * from './Breadcrumbs'
10
10
  export * from './Button'
11
11
  export * from './ChipMenu/ChipMenu'
12
- export * from './FindAndReplace/FindAndReplace'
12
+ export * from './Container/Container'
13
13
  export * from './ContainerWithHeader/ContainerWithHeader'
14
14
  export * from './Fab'
15
+ export * from './FindAndReplace/FindAndReplace'
15
16
  export * from './FlagAvatar/FlagAvatar'
16
17
  export * from './Footer'
17
18
  export * from './Form/Form'
@@ -66,8 +67,8 @@ export * from './UspList/UspListItem'
66
67
  export * from './utils/cookie'
67
68
  export * from './utils/cssFlags'
68
69
  export * from './utils/normalizeLocale'
70
+ export * from './utils/revalidate'
69
71
  export * from './utils/robots'
70
72
  export * from './utils/sitemap'
71
73
  export * from './utils/storefrontConfig'
72
74
  export * from './utils/sxx'
73
- export * from './Container/Container'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.46",
5
+ "version": "9.1.0-canary.48",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -24,13 +24,13 @@
24
24
  "@emotion/react": "^11",
25
25
  "@emotion/server": "^11",
26
26
  "@emotion/styled": "^11",
27
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.46",
28
- "@graphcommerce/framer-next-pages": "^9.1.0-canary.46",
29
- "@graphcommerce/framer-scroller": "^9.1.0-canary.46",
30
- "@graphcommerce/framer-utils": "^9.1.0-canary.46",
31
- "@graphcommerce/image": "^9.1.0-canary.46",
32
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.46",
33
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.46",
27
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.48",
28
+ "@graphcommerce/framer-next-pages": "^9.1.0-canary.48",
29
+ "@graphcommerce/framer-scroller": "^9.1.0-canary.48",
30
+ "@graphcommerce/framer-utils": "^9.1.0-canary.48",
31
+ "@graphcommerce/image": "^9.1.0-canary.48",
32
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.48",
33
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.48",
34
34
  "@lingui/core": "^4.2.1",
35
35
  "@lingui/macro": "^4.2.1",
36
36
  "@lingui/react": "^4.2.1",
package/server.ts CHANGED
@@ -1,9 +1,10 @@
1
+ export * from './Document'
2
+ export * from './PageMeta/canonicalize'
1
3
  export * from './Styles/withEmotionCache'
4
+ export * from './utils/cookie'
2
5
  export * from './utils/getCssFlagInitScript'
3
6
  export * from './utils/normalizeLocale'
7
+ export * from './utils/revalidate'
4
8
  export * from './utils/robots'
5
9
  export * from './utils/sitemap'
6
10
  export * from './utils/storefrontConfig'
7
- export * from './PageMeta/canonicalize'
8
- export * from './Document'
9
- export * from './utils/cookie'
@@ -0,0 +1,13 @@
1
+ type Revalidate = 'minutes' | 'hours' | 'days'
2
+
3
+ export function revalidate(frequency: Revalidate = 'minutes') {
4
+ switch (frequency) {
5
+ case 'days':
6
+ return 60 * 60 * 24 * 20
7
+ case 'hours':
8
+ return 60 * 60 * 20
9
+ case 'minutes':
10
+ default:
11
+ return 60 * 20
12
+ }
13
+ }