From 5e1c05f3e460589fe1f134e193b1d164e715fafe Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 20:26:28 +0000 Subject: [PATCH 1/2] view-chain-layout: take the source copy - a layout fix is whitespace-only by construction, not by a check The abap2UI5 repository is the source of this skill; its paragraph on what the linter checks claimed a verification that @abap2ui5/linter 0.9.0 does not perform. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Qid1F6VFxWyQLPvqsr1woq --- .claude/skills/view-chain-layout/SKILL.md | 7 ++++--- catalogue-derived.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.claude/skills/view-chain-layout/SKILL.md b/.claude/skills/view-chain-layout/SKILL.md index 2f9aa6da..3be28935 100644 --- a/.claude/skills/view-chain-layout/SKILL.md +++ b/.claude/skills/view-chain-layout/SKILL.md @@ -126,9 +126,10 @@ first child is another `ele( )`, blank before every `end( )`, none after an The rule is the abap2UI5-linter's **`chain-house-layout`**. It checks rules 1-4 and carries fixes, so `--fix` reformats a drifted chain. The rewrite only ever touches whitespace *between* chain segments and the indent of a continuation -line that is not itself content, and it verifies that collapsing every run of -code-whitespace leaves the source identical — **a layout fix can never change -what the view builds.** Rules 5-7 and the blank lines stay reviewer-enforced. +line that is not itself content — **by construction, not by a check**: the +fixes run to a fixed point and nothing re-parses the result against the +source, so read the diff of a `--fix` run before committing it. Rules 5-7 and +the blank lines stay reviewer-enforced. It is the linter's one **opt-in** rule (`OPT_IN` in its `findings.mjs`): it is not emitted at all until a config asks for it, because it encodes one house diff --git a/catalogue-derived.json b/catalogue-derived.json index 4da8c3c5..53088219 100644 --- a/catalogue-derived.json +++ b/catalogue-derived.json @@ -504,7 +504,7 @@ {"class":"z2ui5_cl_smpc_app_015","description":"With the Custom Tree Item you can add any kind of content to Tree.","minUi5":"1.71","needs":[],"controls":[3,57,58,19,45,59,2],"controlCount":7}, {"class":"z2ui5_cl_smpc_app_016","description":"This example shows Date Picker which is opened by another control.","minUi5":"1.97","needs":[{"type":"member-too-new","name":"sap.m.DatePicker.hideInput","since":"1.97"},{"type":"member-too-new","name":"sap.m.Link.ariaHasPopup","since":"1.86"},{"type":"member-too-new","name":"sap.m.Button.ariaHasPopup","since":"1.84"},{"type":"member-too-new","name":"sap.m.Button.ariaHasPopup","since":"1.84"}],"controls":[3,117,12,13,20,9,2],"controlCount":12}, {"class":"z2ui5_cl_smpc_app_017","description":"The Date Range Selection is an extension of the Date Picker Control and enables the user to select range of dates.","minUi5":"1.95","needs":[{"type":"member-too-new","name":"sap.m.DateRangeSelection.showCurrentDateButton","since":"1.95"}],"controls":[157,12,7,9,2],"controlCount":14}, - {"class":"z2ui5_cl_smpc_app_018","description":"With the DateTimePicker a Date can be entered or selected including the time part.","minUi5":"1.99","needs":[{"type":"member-too-new","name":"sap.m.DateTimePicker.showTimezone","since":"1.99"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showTimezone","since":"1.99"},{"type":"member-too-new","name":"sap.m.DateTimePicker.timezone","since":"1.99"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showCurrentTimeButton","since":"1.98"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showCurrentTimeButton","since":"1.98"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showCurrentDateButton","since":"1.95"}],"controls":[158,12,46,7,20,2,26],"controlCount":26}, + {"class":"z2ui5_cl_smpc_app_018","description":"With the DateTimePicker a Date can be entered or selected including the time part.","minUi5":"1.99","needs":[{"type":"member-too-new","name":"sap.m.DateTimePicker.showTimezone","since":"1.99"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showTimezone","since":"1.99"},{"type":"member-too-new","name":"sap.m.DateTimePicker.timezone","since":"1.99"},{"type":"binding-type-too-new","name":"sap.m.DateTimePicker.value.sap.ui.model.odata.type.DateTimeWithTimezone","since":"1.99"},{"type":"binding-type-too-new","name":"sap.m.DateTimePicker.value.sap.ui.model.odata.type.DateTimeWithTimezone","since":"1.99"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showCurrentTimeButton","since":"1.98"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showCurrentTimeButton","since":"1.98"},{"type":"member-too-new","name":"sap.m.DateTimePicker.showCurrentDateButton","since":"1.95"}],"controls":[158,12,46,7,20,2,26],"controlCount":26}, {"class":"z2ui5_cl_smpc_app_019","description":"Creating a dialog with confirm and reject options that replaces the confirmDialog functionality.","minUi5":"1.71","needs":[],"controls":[3,34,12,7,60,18,2,61,16],"controlCount":37}, {"class":"z2ui5_cl_smpc_app_020","description":"Use the Display List Item for showing name/value pairs.","minUi5":"1.71","needs":[],"controls":[62,1,2,16],"controlCount":7}, {"class":"z2ui5_cl_smpc_app_021","description":"The Draft Indicator shows that eighter currently a draft is saving or that it is already saved. It does not block the current UI screen so other operations could be triggered in parallel.","minUi5":"1.71","needs":[],"controls":[3,63,5,2,16],"controlCount":7}, From 9fb3865ad86b67f073aed889dd60a5bbc9e93173 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 20:26:40 +0000 Subject: [PATCH 2/2] Move @abap2ui5/linter to 0.9.0 and the UI5 runtime pins to 1.153.0 The linter's control metadata is 1.153.0, and check-pins holds the @openui5/@sapui5 runtime pins to the same release. catalogue-derived.json is what 0.9.0 derives (a binding-type-too-new need on app 018). chain-house-layout --fix leaves a comment line at the author's column from 0.9.0 on, so the overview generator now snaps a comment inside a chain to the chain line below it itself - the template emits comments at the template's indent, which 0.8.x happened to shift along with the segment. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Qid1F6VFxWyQLPvqsr1woq --- package-lock.json | 206 +++++++++++++++++------------------ package.json | 40 +++---- scripts/lib/format-chain.mjs | 27 ++++- 3 files changed, 148 insertions(+), 125 deletions(-) diff --git a/package-lock.json b/package-lock.json index bc5490c0..f12a92ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,27 +9,27 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "@abap2ui5/linter": "^0.8.5", + "@abap2ui5/linter": "^0.9.0", "@abaplint/cli": "^2.120.75", - "@openui5/sap.f": "1.152.0", - "@openui5/sap.m": "1.152.0", - "@openui5/sap.tnt": "1.152.0", - "@openui5/sap.ui.codeeditor": "1.152.0", - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.integration": "1.152.0", - "@openui5/sap.ui.layout": "1.152.0", - "@openui5/sap.ui.table": "1.152.0", - "@openui5/sap.ui.unified": "1.152.0", - "@openui5/sap.uxap": "1.152.0", - "@openui5/themelib_sap_horizon": "1.152.0", - "@sapui5/sap.gantt": "1.152.0", - "@sapui5/sap.ndc": "1.152.0", - "@sapui5/sap.suite.ui.commons": "1.152.0", - "@sapui5/sap.suite.ui.microchart": "1.152.0", - "@sapui5/sap.ui.comp": "1.152.0", - "@sapui5/sap.ui.vbm": "1.152.0", - "@sapui5/sap.ui.vk": "1.152.0", - "@sapui5/sap.viz": "1.152.0", + "@openui5/sap.f": "1.153.0", + "@openui5/sap.m": "1.153.0", + "@openui5/sap.tnt": "1.153.0", + "@openui5/sap.ui.codeeditor": "1.153.0", + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.integration": "1.153.0", + "@openui5/sap.ui.layout": "1.153.0", + "@openui5/sap.ui.table": "1.153.0", + "@openui5/sap.ui.unified": "1.153.0", + "@openui5/sap.uxap": "1.153.0", + "@openui5/themelib_sap_horizon": "1.153.0", + "@sapui5/sap.gantt": "1.153.0", + "@sapui5/sap.ndc": "1.153.0", + "@sapui5/sap.suite.ui.commons": "1.153.0", + "@sapui5/sap.suite.ui.microchart": "1.153.0", + "@sapui5/sap.ui.comp": "1.153.0", + "@sapui5/sap.ui.vbm": "1.153.0", + "@sapui5/sap.ui.vk": "1.153.0", + "@sapui5/sap.viz": "1.153.0", "playwright": "^1.64.0" }, "engines": { @@ -37,9 +37,9 @@ } }, "node_modules/@abap2ui5/linter": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@abap2ui5/linter/-/linter-0.8.5.tgz", - "integrity": "sha512-GSqWvLRhFU8F5dOv/DT/nbouVN4B3zWRvPibaK1SCXzpW6bj5LcYDIJPDVce7g8Qoz8WkFaJkw3aTn/5OKqJmA==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@abap2ui5/linter/-/linter-0.9.0.tgz", + "integrity": "sha512-DyhJGFxZzXGH6Ifl3W5KhdDTzy1IFc/uCV0l/2E+cjVrpOc319tXmMqBg6hb3kE3Jw9phIGjADjWPyiiGzXKJg==", "dev": true, "license": "MIT", "workspaces": [ @@ -53,7 +53,7 @@ "node": ">=22" }, "peerDependencies": { - "@abap2ui5/linter-render": ">=0.8.0 <0.9.0", + "@abap2ui5/linter-render": ">=0.8.0 <0.10.0", "@abap2ui5/render-runtime": ">=0.1.0 <0.8.0" }, "peerDependenciesMeta": { @@ -82,175 +82,175 @@ } }, "node_modules/@openui5/sap.f": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.f/-/sap.f-1.152.0.tgz", - "integrity": "sha512-J7uLqtgY4vBlF+ZVkIcDURMuAT/z3ge9JSGm5yL7GDs4qV2H8XuN1LKomBUIZJi0UzvSb9/sSmdPL6MVizyqfA==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.f/-/sap.f-1.153.0.tgz", + "integrity": "sha512-HLlfiti8xwZytbf81yFkbHH/8NHLH/+1WMe3lhoqaQEDZBmkuGBkrApvv+YrrLuU1BVEAlZuOyL7//rptHtdzw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.m": "1.152.0", - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.layout": "1.152.0" + "@openui5/sap.m": "1.153.0", + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.layout": "1.153.0" } }, "node_modules/@openui5/sap.m": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.m/-/sap.m-1.152.0.tgz", - "integrity": "sha512-flMhVNoU13fvJxEppUlboH6GvNIl9hPvDb/IUVWKsFBx8Bjh1gdc5QetvDqBdnt4tYpbsUiu1bKNZKTnenIAqQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.m/-/sap.m-1.153.0.tgz", + "integrity": "sha512-afDAICMYaBBTGyjakB4tbWNSFW+4b6uyJubmUzoQIeZl0LqpH6Pf73XEUxz4NBCiNd8QSNiR7En7n3l5vvkD3w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.layout": "1.152.0", - "@openui5/sap.ui.unified": "1.152.0" + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.layout": "1.153.0", + "@openui5/sap.ui.unified": "1.153.0" } }, "node_modules/@openui5/sap.tnt": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.tnt/-/sap.tnt-1.152.0.tgz", - "integrity": "sha512-vGeO9bNlRQO7aM6dQY0TRpNsbX+abh+AX7DLdzJZZ7ZNCha8b2eA42Xv1avqOM1jghfKe83AJ+dGDQ9p1AG09A==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.tnt/-/sap.tnt-1.153.0.tgz", + "integrity": "sha512-gHztjle7WP4WIq9nXCGpFmZT48HHo7gXxMXUJ6NH88sp6y38PA7V2eLofsvpD+NaNXlgyK8kQuh79QXlJUwEJQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.m": "1.152.0", - "@openui5/sap.ui.core": "1.152.0" + "@openui5/sap.m": "1.153.0", + "@openui5/sap.ui.core": "1.153.0" } }, "node_modules/@openui5/sap.ui.codeeditor": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.ui.codeeditor/-/sap.ui.codeeditor-1.152.0.tgz", - "integrity": "sha512-SZ+++6DIMltcYW1xhnSuYwEZtthIG4FjxLh+QWVC1UcfRfe//N1jTfJkK7GvR1Gs5QPe8Tzl5zbbknn+8bMiFQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.ui.codeeditor/-/sap.ui.codeeditor-1.153.0.tgz", + "integrity": "sha512-vEzHi3a0LM01lSN2gyz23EeqHu02tjPCwOJ/3D6fs+qiGNrwRCtH0MdszFa/s+BdPWXsSR4dp9USPPlFaRg79w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.ui.core": "1.152.0" + "@openui5/sap.ui.core": "1.153.0" } }, "node_modules/@openui5/sap.ui.core": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.ui.core/-/sap.ui.core-1.152.0.tgz", - "integrity": "sha512-1fuV5l/GQAlBHsniGrEzlAB8xrqfAUEAV3GyiRuAywZwH8AWd1zj2jv9wI0RjZgAEn63nlLH/6mdLjLdt6sxMg==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.ui.core/-/sap.ui.core-1.153.0.tgz", + "integrity": "sha512-kJQLIqfDCURHSNpUTJBgDEVCuH31FmXyc8xDvV/JwATQgyJGKMp3t1KIeUyLaOfSh5ux+iA7vHznSPZ0DVsNsA==", "dev": true, "license": "Apache-2.0" }, "node_modules/@openui5/sap.ui.integration": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.ui.integration/-/sap.ui.integration-1.152.0.tgz", - "integrity": "sha512-hOz8q4E9CWxOYSXAo+Ps69009+RAFBClnd/0Pv4uWH7Zl/ETiQTyeIm3jrX3O1Bt7zASIS2z0p5K6CmgkUplOA==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.ui.integration/-/sap.ui.integration-1.153.0.tgz", + "integrity": "sha512-2wdmZj8l0WmZ6Wwq/3aXM5pT0E6uLSXIoNod7Yaafh5PS9ngQgSHvj0+xLlznwxjQLoEYz4HvY1R3gbVKyDAGA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.f": "1.152.0", - "@openui5/sap.m": "1.152.0", - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.layout": "1.152.0", - "@openui5/sap.ui.unified": "1.152.0" + "@openui5/sap.f": "1.153.0", + "@openui5/sap.m": "1.153.0", + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.layout": "1.153.0", + "@openui5/sap.ui.unified": "1.153.0" } }, "node_modules/@openui5/sap.ui.layout": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.ui.layout/-/sap.ui.layout-1.152.0.tgz", - "integrity": "sha512-mSeVxAPODCSxTXbKYKS3xITVxiDmiWpdK4vkCwuZTTPWRicc3MYbUJU5ZbZbxpbwNVIvjABYM+1oKzycdxO1mg==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.ui.layout/-/sap.ui.layout-1.153.0.tgz", + "integrity": "sha512-u4nVCwbl3Xq8EGShHyUqMj/Th9B6k7Vl50kNfz+YCsEnbnk0J3zZrzuHthCB2tyu8Y2RGVaMaNqMr0h/V6qN2w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.ui.core": "1.152.0" + "@openui5/sap.ui.core": "1.153.0" } }, "node_modules/@openui5/sap.ui.table": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.ui.table/-/sap.ui.table-1.152.0.tgz", - "integrity": "sha512-S5QOEZc5DtKu/driTJ1VRiixI7oBKwNkOui+I2v9rE6WxpBush1V+AM2Er1mAj6BlW0adCSvNfn/JHs6fVz1cQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.ui.table/-/sap.ui.table-1.153.0.tgz", + "integrity": "sha512-aIjinh7r/k/cY1dyAW6SkUImJxMcvoqiiAoy3hKwtyAqQL6CfmKCt2McN7VRl3OYmYlKQ6AD/+XFiJ4T9VFcCg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.unified": "1.152.0" + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.unified": "1.153.0" } }, "node_modules/@openui5/sap.ui.unified": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.ui.unified/-/sap.ui.unified-1.152.0.tgz", - "integrity": "sha512-d7AMOorJLBQQlCLho71CEAJMEIBNGcfF81kddZQLjz2/hM1sEIRdnvx5NWdCdKGHO4m0JvWHYcSHaRx88ZUStw==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.ui.unified/-/sap.ui.unified-1.153.0.tgz", + "integrity": "sha512-m0J4zy2m7IdbTYH7U3Ce1HQ3IC0SonP2Pq6V5K1cw5m3Rur8Jc9VU7RioGHbLA1TJJYrJmhiGw3Ad9KiBROvKw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.ui.core": "1.152.0" + "@openui5/sap.ui.core": "1.153.0" } }, "node_modules/@openui5/sap.uxap": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/sap.uxap/-/sap.uxap-1.152.0.tgz", - "integrity": "sha512-E0lzmDEKrzbXyMsws208KLXF8wcyR72VBVBhvXmEQpccYBZqQKY9m+7vDA3k3uHpRsY4FTm1ROzIjsY0PX99NA==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/sap.uxap/-/sap.uxap-1.153.0.tgz", + "integrity": "sha512-ll6lBlwY0GpG4YzW1rxhfY+U9Zgh7GI6SJttzfjYPY299CJvHef+BQh9X/cx6DVi1dtlOG6ZTus38UWf4q7VQA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@openui5/sap.f": "1.152.0", - "@openui5/sap.m": "1.152.0", - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.layout": "1.152.0" + "@openui5/sap.f": "1.153.0", + "@openui5/sap.m": "1.153.0", + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.layout": "1.153.0" } }, "node_modules/@openui5/themelib_sap_horizon": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@openui5/themelib_sap_horizon/-/themelib_sap_horizon-1.152.0.tgz", - "integrity": "sha512-NY0HkXn4fBKp3umdDVKX+D0o1Pz90hTj0+M0ri7GCj/lnHlxuLvF3lZH5hKRT/5DDx+dq9RhBNRO84EMym67AQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@openui5/themelib_sap_horizon/-/themelib_sap_horizon-1.153.0.tgz", + "integrity": "sha512-p7uwFDQvt3PMXp9GhBzPbAAhmd31kFZZ6N2cckMEyUehW1TQqNW5OQimrJwI+syM4Pnb5quz3xWPuNMdL+MxVg==", "dev": true, "license": "Apache-2.0" }, "node_modules/@sapui5/sap.gantt": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.gantt/-/sap.gantt-1.152.0.tgz", - "integrity": "sha512-0Rbs6zZBgX6Hml54nnKK8LVIQdHvpjhZMJ+8TppO9yEqq+FdzAua0N2SO5k4PbS55hMsPY0oiEcrnQGkkw6/yQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.gantt/-/sap.gantt-1.153.0.tgz", + "integrity": "sha512-OE3wA4879fly5W3LNNTZwSdKbQSxKpO8XGqeicae/nu57oOIQk9qYIaxZlmjZVUmmRkwmE/biaM2lLWcH4m39w==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.ndc": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.ndc/-/sap.ndc-1.152.0.tgz", - "integrity": "sha512-DPF11GWa0FDFWVccYMow2AMyFICRPQMLnvSciejHHXUQFnzJfs9NbKms1DnLjZiuWn9QL4tKxKBfXMyvbSyq3Q==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.ndc/-/sap.ndc-1.153.0.tgz", + "integrity": "sha512-531kaYRBuj6IGHTxx6NYgrlLtKr5xi2sGljNl0iCh/mXAPJ3MKAx3p9P3Bp4K1ubac8PMkdvZBfE2kUAcrdF4w==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.suite.ui.commons": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.suite.ui.commons/-/sap.suite.ui.commons-1.152.0.tgz", - "integrity": "sha512-23aRZhW+N0OKNxumoG/UR6+Zjgodf8n7kma+fqTnownnYUmEAsrcxMuJ31fTZXsJ0ng3JKsfXc0pTRNKqFOPGA==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.suite.ui.commons/-/sap.suite.ui.commons-1.153.0.tgz", + "integrity": "sha512-FvkG5svuU0ogt96+upLikiyCbVstKXb2JF2pWBOP6H2MSrxJtQ3HxmyWuUJvqJsW+ng5LObm8iBT+cR+gFq7cw==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.suite.ui.microchart": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.suite.ui.microchart/-/sap.suite.ui.microchart-1.152.0.tgz", - "integrity": "sha512-YR5OB+3T+koby3jNKOUkFjheGbsHopsZYfN/SATnlfGB2Aw0V8kjej18yGTnobBne/BM0lYClEoFk5f8haISQQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.suite.ui.microchart/-/sap.suite.ui.microchart-1.153.0.tgz", + "integrity": "sha512-gpqgap4SyHWG560jk/iP/M1CQCq05jmA0Q+14RlN+7Nyoqrey+OkVUqwacrvhFj2VOiBGbURH0HGXnDKgD+62A==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.ui.comp": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.ui.comp/-/sap.ui.comp-1.152.0.tgz", - "integrity": "sha512-A9U4Dty17pOCLAivmfaspPYzI2fV9PQbFgm6G8HRXwgMcqTNfmabRDH4xnqBbqzjsRqWVFbb0V0xjmE8+SrpWA==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.ui.comp/-/sap.ui.comp-1.153.0.tgz", + "integrity": "sha512-5pTIjpoK97gBT8ohD11Sdsh9NdwICKFiGg1fMSpnwQyHm6gDgttl0PAh744h/2k1ONMfGoV3B6ymHEslYuAB5A==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.ui.vbm": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.ui.vbm/-/sap.ui.vbm-1.152.0.tgz", - "integrity": "sha512-vfLZuIrFSRAhZ7aXWKL7NWOeNZsEkBOzYeMpeeHvHfS7LMD6dQY+dN9oKiQYyyEwgI6DVzbqM0rLx2ftCLx9vw==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.ui.vbm/-/sap.ui.vbm-1.153.0.tgz", + "integrity": "sha512-YRxm01LgEiMSgrx0Tpktc+0kbD5ZyaoS/NiQlwb33HV4MzU99oixzQL2NGjnXTb8e0ac/frY3ilwoJozvYdGNw==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.ui.vk": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.ui.vk/-/sap.ui.vk-1.152.0.tgz", - "integrity": "sha512-7OtEr6KABrkfwL0HsYn1soi81/VIPJlKDPzIEszHi5p8SxR9bK4FvOwmzdSck9EkCRh0gfB+817auWRft58+GQ==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.ui.vk/-/sap.ui.vk-1.153.0.tgz", + "integrity": "sha512-tNZynN00QWJBIIHEA5SbppFcdCXmjxnJu97FARogE9Dt4NjXUdqzgd1265/S96w1qQIgGTh43q6qe9EeqQR43Q==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, "node_modules/@sapui5/sap.viz": { - "version": "1.152.0", - "resolved": "https://registry.npmjs.org/@sapui5/sap.viz/-/sap.viz-1.152.0.tgz", - "integrity": "sha512-tdSWdjOVCQAbO/7xya4PC5hTcE+Jc2kBrN6SY1bu5aA0ze12IbVPotE3H9EsRmZPLzewkPL4byjzVFsAHrCc8Q==", + "version": "1.153.0", + "resolved": "https://registry.npmjs.org/@sapui5/sap.viz/-/sap.viz-1.153.0.tgz", + "integrity": "sha512-UbwKpIwt4w/r415SH8GH93ksQx5dDwpfkhNFzrA30OK+HSVsYHBIygIOIbdjegkCE8na9QbgTCCBoWPOttvv+g==", "dev": true, "license": "SEE LICENSE IN LICENSE.txt" }, diff --git a/package.json b/package.json index 31e7afa3..b6506637 100644 --- a/package.json +++ b/package.json @@ -57,27 +57,27 @@ }, "homepage": "https://github.com/abap2UI5/samples-controls#readme", "devDependencies": { - "@abap2ui5/linter": "^0.8.5", + "@abap2ui5/linter": "^0.9.0", "@abaplint/cli": "^2.120.75", - "@openui5/sap.f": "1.152.0", - "@openui5/sap.m": "1.152.0", - "@openui5/sap.tnt": "1.152.0", - "@openui5/sap.ui.codeeditor": "1.152.0", - "@openui5/sap.ui.core": "1.152.0", - "@openui5/sap.ui.integration": "1.152.0", - "@openui5/sap.ui.layout": "1.152.0", - "@openui5/sap.ui.table": "1.152.0", - "@openui5/sap.ui.unified": "1.152.0", - "@openui5/sap.uxap": "1.152.0", - "@openui5/themelib_sap_horizon": "1.152.0", - "@sapui5/sap.gantt": "1.152.0", - "@sapui5/sap.ndc": "1.152.0", - "@sapui5/sap.suite.ui.commons": "1.152.0", - "@sapui5/sap.suite.ui.microchart": "1.152.0", - "@sapui5/sap.ui.comp": "1.152.0", - "@sapui5/sap.ui.vbm": "1.152.0", - "@sapui5/sap.ui.vk": "1.152.0", - "@sapui5/sap.viz": "1.152.0", + "@openui5/sap.f": "1.153.0", + "@openui5/sap.m": "1.153.0", + "@openui5/sap.tnt": "1.153.0", + "@openui5/sap.ui.codeeditor": "1.153.0", + "@openui5/sap.ui.core": "1.153.0", + "@openui5/sap.ui.integration": "1.153.0", + "@openui5/sap.ui.layout": "1.153.0", + "@openui5/sap.ui.table": "1.153.0", + "@openui5/sap.ui.unified": "1.153.0", + "@openui5/sap.uxap": "1.153.0", + "@openui5/themelib_sap_horizon": "1.153.0", + "@sapui5/sap.gantt": "1.153.0", + "@sapui5/sap.ndc": "1.153.0", + "@sapui5/sap.suite.ui.commons": "1.153.0", + "@sapui5/sap.suite.ui.microchart": "1.153.0", + "@sapui5/sap.ui.comp": "1.153.0", + "@sapui5/sap.ui.vbm": "1.153.0", + "@sapui5/sap.ui.vk": "1.153.0", + "@sapui5/sap.viz": "1.153.0", "playwright": "^1.64.0" }, "engines": { diff --git a/scripts/lib/format-chain.mjs b/scripts/lib/format-chain.mjs index b5516b9c..123381b7 100644 --- a/scripts/lib/format-chain.mjs +++ b/scripts/lib/format-chain.mjs @@ -57,14 +57,37 @@ export function formatSource(source, { skipMethods = [] } = {}) { ); } +/* A `"` comment line inside a chain sits at the column of the chain line it + * describes - the one right below it. The template strings emit it there, + * but at the template's indent, and the linter's fix (0.9.0 on) leaves a + * comment line where the author put it when it re-lays the segment below + * (0.8.x moved it by the segment's delta, which happened to be what the + * template needed). So after every pass the comment is snapped to the next + * non-blank line's column when that line continues the chain. */ +function alignChainComments(source) { + const lines = source.split('\n'); + for (let i = 0; i < lines.length; i++) { + const m = /^(\s*)"/.exec(lines[i]); + if (!m) continue; + let j = i + 1; + while (j < lines.length && /^\s*"/.test(lines[j])) j++; + if (j >= lines.length) break; + const next = /^(\s*)\)->/.exec(lines[j]); + if (!next) continue; + for (let k = i; k < j; k++) lines[k] = next[1] + lines[k].trimStart(); + i = j - 1; + } + return lines.join('\n'); +} + function formatChains(source) { let out = source; for (let pass = 0; pass < MAX_PASSES; pass++) { const { findings } = checkAbapSource(out, { rules: RULES, file: 'overview.clas.abap' }); const fixable = findings.filter((f) => f.type === 'chain-house-layout' && isFixable(f)); - if (!fixable.length) return out; + if (!fixable.length) return alignChainComments(out); const { output, applied } = applyFixes(out, fixable); - if (!applied) return out; + if (!applied) return alignChainComments(out); out = output; } /* Loud rather than silent: reaching this means the rule keeps reporting a