@adobe/helix-md2jcr 1.1.25 → 1.1.27

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,3 +1,17 @@
1
+ ## [1.1.27](https://github.com/adobe/helix-md2jcr/compare/v1.1.26...v1.1.27) (2025-07-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * component class sets modelId from template definition instead of id property ([#121](https://github.com/adobe/helix-md2jcr/issues/121)) ([c0304d2](https://github.com/adobe/helix-md2jcr/commit/c0304d2f2df1a5d5cd52dfc2c9d6e9dee2bfc8e0)), closes [#120](https://github.com/adobe/helix-md2jcr/issues/120)
7
+
8
+ ## [1.1.26](https://github.com/adobe/helix-md2jcr/compare/v1.1.25...v1.1.26) (2025-07-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * cards items with classes field, but not value fail to render ([#116](https://github.com/adobe/helix-md2jcr/issues/116)) ([60f7e77](https://github.com/adobe/helix-md2jcr/commit/60f7e77422cc77b3a8641166089b8bc726c72007))
14
+
1
15
  ## [1.1.25](https://github.com/adobe/helix-md2jcr/compare/v1.1.24...v1.1.25) (2025-06-27)
2
16
 
3
17
 
@@ -0,0 +1,27 @@
1
+ import { defineConfig, globalIgnores } from '@eslint/config-helpers';
2
+ import { recommended, source, test } from '@adobe/eslint-config-helix';
3
+ import importPlugin from 'eslint-plugin-import';
4
+
5
+ export default defineConfig([
6
+ globalIgnores([
7
+ '.vscode/*',
8
+ 'coverage/*',
9
+ 'dist/*',
10
+ ]),
11
+ {
12
+ extends: [recommended],
13
+ plugins: {
14
+ import: importPlugin,
15
+ },
16
+ rules: {
17
+ 'import/extensions': 'off',
18
+ },
19
+ settings: {
20
+ 'import/resolver': {
21
+ exports: {},
22
+ },
23
+ },
24
+ },
25
+ source,
26
+ test,
27
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-md2jcr",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "Helix Service that converts markdown to JCR content structure",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -54,8 +54,8 @@
54
54
  "xml-formatter": "^3.6.3"
55
55
  },
56
56
  "devDependencies": {
57
- "@adobe/eslint-config-helix": "2.0.9",
58
- "@adobe/helix-mediahandler": "2.7.13",
57
+ "@adobe/eslint-config-helix": "3.0.8",
58
+ "@adobe/helix-mediahandler": "2.7.17",
59
59
  "@commitlint/cli": "^19.6.1",
60
60
  "@commitlint/config-conventional": "^19.6.0",
61
61
  "@semantic-release/changelog": "6.0.3",
@@ -63,8 +63,8 @@
63
63
  "@semantic-release/git": "10.0.1",
64
64
  "c8": "10.1.3",
65
65
  "chai": "^5.2.0",
66
- "dotenv": "16.5.0",
67
- "eslint": "8.57.1",
66
+ "dotenv": "16.6.1",
67
+ "eslint": "^9.0.0",
68
68
  "eslint-import-resolver-exports": "1.0.0-beta.5",
69
69
  "eslint-plugin-header": "3.1.1",
70
70
  "eslint-plugin-import": "2.32.0",
@@ -74,7 +74,7 @@
74
74
  "mocha": "10.8.2",
75
75
  "mocha-multi-reporters": "1.5.1",
76
76
  "nock": "13.5.6",
77
- "semantic-release": "24.2.5",
77
+ "semantic-release": "24.2.7",
78
78
  "unist-util-inspect": "8.1.0",
79
79
  "yauzl": "3.2.0"
80
80
  },
@@ -42,7 +42,7 @@ function columnsPartial(context) {
42
42
 
43
43
  if (match) {
44
44
  const blockName = match.groups.blockName.trim();
45
- const modelId = getModelId(definition, blockName);
45
+ const modelId = getModelId(definition, blockName) || 'columns';
46
46
  const blockClasses = match.groups.classes ? match.groups.classes.split(',').map((c) => c.trim()) : [];
47
47
 
48
48
  const model = findModelById(models, modelId);
@@ -277,8 +277,13 @@ function extractProperties(mdast, model, mode, component, fields, properties) {
277
277
  // gather all the cells from the row
278
278
  const cells = findAll(row, (node) => node.type === 'gtCell', false);
279
279
 
280
- // if we are block and our first cell is a class field then skip it
281
- if (mode === 'blockItem' && classesField) {
280
+ // if we are block-item
281
+ // and we have a classess field
282
+ // and we have more cells than model fields...
283
+ // We then want to throw away the first cell as it is the class field
284
+ // EC currently does not add the classes field therefore more cells than model fields
285
+ // See container-block.md for an example of more cells than model fields (second table)
286
+ if (mode === 'blockItem' && classesField && (cells.length > modelFields.length)) {
282
287
  cells.shift();
283
288
  }
284
289