Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- v2

permissions:
contents: read
Expand Down
9 changes: 6 additions & 3 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"branches": ["main"],
"branches": ["main", "v2"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
["@semantic-release/exec", {
"prepareCmd": "sed -i \"s/export const VERSION = '.*'/export const VERSION = '${nextRelease.version}'/\" src/index.js"
}],
["@semantic-release/git", {
"assets": ["CHANGELOG.md", "package.json"],
"assets": ["CHANGELOG.md", "package.json", "src/index.js"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
}
169 changes: 169 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@babel/eslint-parser": "7.22.15",
"@playwright/test": "1.44.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@semantic-release/npm": "12.0.1",
"eslint": "8.48.0",
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export function debug(...args) {
}
}

export const VERSION = '1.0.1';

export const DEFAULT_OPTIONS = {

// Audiences related properties
Expand Down Expand Up @@ -1100,6 +1102,7 @@ export async function loadEager(document, options = {}) {
setDebugMode(window.location, pluginOptions);

const ns = window.aem || window.hlx || {};
ns.experimentation = { version: VERSION };
ns.audiences = await serveAudience(document, pluginOptions);
ns.experiments = await runExperiment(document, pluginOptions);
ns.campaigns = await runCampaign(document, pluginOptions);
Expand Down