-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/r20-994-favicon-generator
- Loading branch information
Showing
32 changed files
with
203 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,34 @@ | ||
# Changelog | ||
|
||
## v2.3.1 | ||
|
||
[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/v2.3.0...v2.3.1) | ||
|
||
|
||
### 🚀 Enhancements | ||
|
||
- **nuxt-ripple:** Pass through section-cache-tags response header ([cf3d6477](https://github.com/dpc-sdp/ripple-framework/commit/cf3d6477)) | ||
- **@dpc-sdp/ripple-tide-api:** Merged site+alert cache tags with page cache tags ([98c2c956](https://github.com/dpc-sdp/ripple-framework/commit/98c2c956)) | ||
|
||
### 🩹 Fixes | ||
|
||
- **@dpc-sdp/ripple-tide-api:** Increase menu depth for breadcrumbs ([43ea5efa](https://github.com/dpc-sdp/ripple-framework/commit/43ea5efa)) | ||
- **@dpc-sdp/ripple-tide-publication:** Add missed optional chaining ([23e6807f](https://github.com/dpc-sdp/ripple-framework/commit/23e6807f)) | ||
- **@dpc-sdp/ripple-tide-api:** Add optional chaining ([0f84540a](https://github.com/dpc-sdp/ripple-framework/commit/0f84540a)) | ||
|
||
### 💅 Refactors | ||
|
||
- **@dpc-sdp/ripple-tide-api:** Refactored http client to not swallow up headers ([da09ec47](https://github.com/dpc-sdp/ripple-framework/commit/da09ec47)) | ||
|
||
### ✅ Tests | ||
|
||
- **@dpc-sdp/ripple-tide-api:** Fixed unit tests ([57c92cd4](https://github.com/dpc-sdp/ripple-framework/commit/57c92cd4)) | ||
|
||
### ❤️ Contributors | ||
|
||
- Jeffrey Dowdle <[email protected]> | ||
- David Featherston <[email protected]> | ||
|
||
## v2.3.0 | ||
|
||
[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/v2.2.1...v2.3.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"npmClient": "pnpm", | ||
"exact": true, | ||
"command": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/eslint-config-ripple", | ||
"description": "ESLint config for Ripple projects", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
"main": "index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/nuxt-ripple-analytics", | ||
"description": "Nuxt module for handling event tracking.", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"main": "./nuxt.config.ts", | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/nuxt-ripple-cli", | ||
"description": "A CLI for simplifying common setup and scaffolding tasks", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
"main": "./dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/nuxt-ripple-preview", | ||
"description": "Adds support for drupal preview links in Ripple frontend sites", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"main": "./nuxt.config.ts", | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
|
33 changes: 33 additions & 0 deletions
33
packages/nuxt-ripple/composables/use-merge-section-tags.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { setResponseHeader, getResponseHeaders } from 'h3' | ||
|
||
// Merge two section cache tags string and deduplicate tag | ||
// Return a string of merged tags | ||
const mergeTags = (existingTags: string, newTags: string): string => { | ||
const tags1 = existingTags.split(' ') | ||
const tags2 = newTags.split(' ') | ||
const tags = [...new Set([...tags1, ...tags2])] | ||
return tags.join(' ') | ||
} | ||
|
||
export const useMergeSectionTags = async ( | ||
sectionCacheTags: any | ||
): Promise<void> => { | ||
const event = useRequestEvent() | ||
// Section.io cache tags must be set on the response header to invalidate the cache after a change in drupal | ||
if (sectionCacheTags) { | ||
const currentResponseHeaders = getResponseHeaders(event) | ||
|
||
const currentSectionTags: string = | ||
currentResponseHeaders && currentResponseHeaders['section-cache-tags'] | ||
? (currentResponseHeaders['section-cache-tags'] as string) | ||
: ('' as string) | ||
|
||
setResponseHeader( | ||
event, | ||
'section-cache-tags', | ||
mergeTags(currentSectionTags, sectionCacheTags) | ||
) | ||
} | ||
} | ||
|
||
export default useMergeSectionTags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/nuxt-ripple", | ||
"description": "Nuxt module for integrating Ripple and Tide", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"main": "./nuxt.config.ts", | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "ripple-storybook", | ||
"description": "Ripple Storybook instance", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"private": true, | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/ripple-test-utils", | ||
"description": "Test utils for Ripple sites", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"main": "./dist/config/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"packageManager": "[email protected]", | ||
"name": "@dpc-sdp/ripple-tide-api", | ||
"description": "Ripple API endpoints for Tide Drupal backend", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "Apache-2.0", | ||
"repository": "https://github.com/dpc-sdp/ripple-framework", | ||
"main": "./dist/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.