@record-evolution/widget-markdown 1.0.8 → 1.0.9

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent widget-markdown following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "widget-markdown",
6
- "version": "1.0.8",
6
+ "version": "1.0.9",
7
7
  "engines": {
8
8
  "node": ">=24.9.0",
9
9
  "npm": ">=10.0.2"
@@ -25,7 +25,11 @@
25
25
  "link": "npm run build && npm link && cd ../RESWARM/frontend && npm link @record-evolution/widget-markdown",
26
26
  "unlink": "npm unlink --global && cd ../RESWARM/frontend && npm unlink @record-evolution/widget-markdown && npm i @record-evolution/widget-markdown",
27
27
  "types": "cat src/definition-schema.json | json2ts > src/definition-schema.d.ts",
28
- "release": "npm run build && npm run types && npm version patch --tag-version-prefix='' && git push && git push --tag && npm run build"
28
+ "preversion": "sh scripts/release-preflight.sh",
29
+ "postversion": "git push --follow-tags && sh scripts/release-verify.sh",
30
+ "release": "npm version patch",
31
+ "release:minor": "npm version minor",
32
+ "release:major": "npm version major"
29
33
  },
30
34
  "dependencies": {
31
35
  "github-markdown-css": "^5.8.1",
@@ -119,13 +119,15 @@ export class WidgetMarkdown extends LitElement {
119
119
  const dataItem = this.inputData?.data?.find((item) => item.label === varName)
120
120
  const value = dataItem?.value
121
121
 
122
+ // An unbound variable, or one whose bound value is empty, renders as
123
+ // nothing — never as the raw {{placeholder}}.
122
124
  if (value === null || value === undefined) {
123
- span.textContent = `{{${varName}}}`
125
+ span.textContent = ''
124
126
  } else if (typeof value === 'object') {
125
127
  try {
126
128
  span.textContent = JSON.stringify(value)
127
129
  } catch {
128
- span.textContent = `{{${varName}}}`
130
+ span.textContent = ''
129
131
  }
130
132
  } else {
131
133
  span.textContent = String(value)