From bfe7bfa38a7c4b08f614ca0e10f54aa1b755ad52 Mon Sep 17 00:00:00 2001 From: Maciej Krajowski-Kukiel Date: Wed, 9 Sep 2026 16:31:23 +0200 Subject: [PATCH] updates --- gui/next/playwright/database.spec.js | 42 ++++++--- lib/check.js | 6 +- package-lock.json | 131 ++++++++++++++------------- package.json | 8 +- test/integration/check.test.js | 2 +- 5 files changed, 105 insertions(+), 84 deletions(-) diff --git a/gui/next/playwright/database.spec.js b/gui/next/playwright/database.spec.js index 8eabb1df..ada90edb 100644 --- a/gui/next/playwright/database.spec.js +++ b/gui/next/playwright/database.spec.js @@ -555,48 +555,64 @@ test('adding a record with broken array and expecting validation error', async ( }); -test('editing a record', async ({ page }) => { +test('editing a record', async ({ page }, testInfo) => { + // Unique per attempt: a retry runs against the record the previous attempt left behind, and + // a value shared with it would match two cells and fail Playwright's strict mode. + const item = `new_array_item_3_${testInfo.retry}`; + const editedItem = `edited_array_item_3_${testInfo.retry}`; + await page.goto(url); await page.getByText('qa_table_1').click(); await page.getByRole('button', { name: 'Create new record' }).click(); - await page.getByLabel('qa_table_1_array').fill('["new_array_item_3", "new_array_item_4"]'); + await page.getByLabel('qa_table_1_array').fill(`["${item}", "new_array_item_4"]`); await page.getByRole('button', { name: 'Create record' }).click(); - await expect(page.getByRole('cell', { name: '["new_array_item_3"' })).toBeVisible(); + const createdCell = page.getByRole('cell', { name: `["${item}"` }); + await expect(createdCell).toBeVisible(); - await page.getByRole('button', { name: 'Edit record' }).first().click(); - await page.getByLabel('qa_table_1_array').fill('["edited_array_item_3", "edited_array_item_4"]'); + // Edit the row holding this test's own record, not the first row: records are listed newest + // first and the other workers create records in the same table, so between this create and + // the list refresh that follows it another test's record can take the top row. + await page.locator('tr', { has: createdCell }).getByRole('button', { name: 'Edit record' }).click(); + await page.getByLabel('qa_table_1_array').fill(`["${editedItem}", "edited_array_item_4"]`); const dialog = page.locator('dialog'); await dialog.getByRole('button', { name: 'Edit record' }).first().click(); - await expect(page.getByRole('cell', { name: '["new_array_item_3"' })).toBeHidden(); - await expect(page.getByRole('cell', { name: '["edited_array_item_3"' })).toBeVisible(); + await expect(createdCell).toBeHidden(); + await expect(page.getByRole('cell', { name: `["${editedItem}"` })).toBeVisible(); }); -test('deleting a record', async ({ page }) => { +test('deleting a record', async ({ page }, testInfo) => { page.on('dialog', async dialog => { expect(dialog.message()).toEqual('Are you sure you want to delete this record?'); await dialog.accept(); }); + // Unique per attempt, for the same reason as in 'editing a record' above. + const item = `to_be_deleted_array_${testInfo.retry}`; + await page.goto(url); await page.getByText('qa_table_1').click(); await page.getByRole('button', { name: 'Create new record' }).click(); - await page.getByLabel('qa_table_1_array').fill('["to_be_deleted_array"]'); + await page.getByLabel('qa_table_1_array').fill(`["${item}"]`); await page.getByRole('button', { name: 'Create record' }).click(); - await expect(page.getByRole('cell', { name: '["to_be_deleted_array"' })).toBeVisible(); + const createdCell = page.getByRole('cell', { name: `["${item}"` }); + await expect(createdCell).toBeVisible(); - await page.getByRole('button', { name: 'More options' }).first().click(); - await page.getByRole('button', { name: 'Delete record' }).click(); + // Delete the row holding this test's own record, not the first row: another test's record can + // take the top row while this one runs. + const createdRow = page.locator('tr', { has: createdCell }); + await createdRow.getByRole('button', { name: 'More options' }).click(); + await createdRow.getByRole('button', { name: 'Delete record' }).click(); - await expect(page.getByRole('cell', { name: '["to_be_deleted_array"' })).toBeHidden(); + await expect(createdCell).toBeHidden(); }); diff --git a/lib/check.js b/lib/check.js index 3692766a..2f5b8087 100644 --- a/lib/check.js +++ b/lib/check.js @@ -358,7 +358,11 @@ const initConfig = async (rootPath) => { // Create the initial config that extends recommended settings const initConfig = { extends: 'platformos-check:recommended', - ignore: ['node_modules/**'] + // Bare name, not `node_modules/**`: since platformos-check 1.1.0 a slash-bearing + // pattern is anchored on the project root, so `node_modules/**` would stop covering + // a nested one (`modules//node_modules`). A bare name still matches at any + // depth, and covers the directory's contents as well as a file of that name. + ignore: ['node_modules'] }; const initConfigYml = YAML.stringify(initConfig); diff --git a/package-lock.json b/package-lock.json index 2c920837..38cfd6e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,10 +16,10 @@ "license": "CC BY 3.0", "dependencies": { "@inquirer/prompts": "^8.7.0", - "@platformos/platformos-check-node": "^1.0.0", - "@platformos/platformos-common": "^0.1.0", - "@platformos/platformos-language-server-node": "^0.1.0", - "@platformos/platformos-mcp-supervisor": "^0.1.0", + "@platformos/platformos-check-node": "^1.1.0", + "@platformos/platformos-common": "^0.2.0", + "@platformos/platformos-language-server-node": "^0.1.1", + "@platformos/platformos-mcp-supervisor": "^0.2.0", "ajv": "^8.20.0", "ajv-formats": "^3.0.1", "async": "^3.2.6", @@ -1298,9 +1298,9 @@ } }, "node_modules/@platformos/liquid-html-parser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@platformos/liquid-html-parser/-/liquid-html-parser-0.1.0.tgz", - "integrity": "sha512-q3O5BSEDkydBsXnwrDJ56A/x1ab0DpPPQZRLD6ZW4qpRwZ7TFR2HGgoBYEhc4lfi7T+zb4DzlONX057Vpbndaw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@platformos/liquid-html-parser/-/liquid-html-parser-0.2.0.tgz", + "integrity": "sha512-PA6+YlhR9kY8OBPyPEIjYO9moub3lu5WZCJvlnZQsUDmTTmiOi8EgvCVnJnjOF88roIIQDHapsejlT/tAogtNw==", "license": "MIT", "dependencies": { "line-column": "^1.0.2", @@ -1308,13 +1308,13 @@ } }, "node_modules/@platformos/platformos-check-common": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-check-common/-/platformos-check-common-1.0.0.tgz", - "integrity": "sha512-CDUooXAGDoZ50ao572Hlh83KTGC+yc+ZClVNE5LX2QHLuQ8pCQyuYlzeGlq3+cx5qd5l/r7SWnKO/O5LCT6GCg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@platformos/platformos-check-common/-/platformos-check-common-1.1.0.tgz", + "integrity": "sha512-LQKXd/uWOlL595wkkhOLxytmEBzip7f7/LxoBd9DA2NBAr3tf+aZaZ72ShhxBgYREigHCRs0afuQy8k4nTQQ2g==", "license": "MIT", "dependencies": { - "@platformos/liquid-html-parser": "0.1.0", - "@platformos/platformos-common": "0.1.0", + "@platformos/liquid-html-parser": "0.2.0", + "@platformos/platformos-common": "0.2.0", "graphql": "^16.12.0", "js-yaml": "^4.1.1", "jsonc-parser": "^3.3.1", @@ -1326,12 +1326,12 @@ } }, "node_modules/@platformos/platformos-check-docs-updater": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-check-docs-updater/-/platformos-check-docs-updater-1.0.0.tgz", - "integrity": "sha512-p5UUdCh7bL6LJHMV/d6GdYQQAaVPkYYTWJRwNM06Ry17ROqgleqZkNfz/9zHUB5DrcwCkOa3vm76/2ug2ZKM0g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@platformos/platformos-check-docs-updater/-/platformos-check-docs-updater-1.1.0.tgz", + "integrity": "sha512-FHhyRL4kTwzTp5XVqX8V9pd7jbkujzlf6qu6n6GzokSxfaEsa/siQKvMEoquP+pdfwQhwuHHCp9X51+LuIwFlA==", "license": "MIT", "dependencies": { - "@platformos/platformos-check-common": "1.0.0", + "@platformos/platformos-check-common": "1.1.0", "env-paths": "^2.2.1", "he": "^1.2.0" }, @@ -1340,40 +1340,41 @@ } }, "node_modules/@platformos/platformos-check-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-check-node/-/platformos-check-node-1.0.0.tgz", - "integrity": "sha512-Ex8VosocMrD3Qp4edBa2+g5e2xzgtSPEQi7Jtx6s0wP+SIbDfQm/4xvtzrMVAeAkVXnRmGpzxHCCFtqshrHpYg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@platformos/platformos-check-node/-/platformos-check-node-1.1.0.tgz", + "integrity": "sha512-AEO+SWzeGe2tNAi2ngYGpMx8LUbL3Q3l2vEnCn0knH2UCHS1UhSFydH4nstF3QafJWnk2Q3u/1aYUdSHxar2Hw==", "license": "MIT", "dependencies": { - "@platformos/liquid-html-parser": "0.1.0", - "@platformos/platformos-check-common": "1.0.0", - "@platformos/platformos-check-docs-updater": "1.0.0", - "@platformos/platformos-common": "0.1.0", + "@platformos/liquid-html-parser": "0.2.0", + "@platformos/platformos-check-common": "1.1.0", + "@platformos/platformos-check-docs-updater": "1.1.0", + "@platformos/platformos-common": "0.2.0", "glob": "^13.0.0", "vscode-uri": "^3.1.0", "yaml": "^2.8.2" } }, "node_modules/@platformos/platformos-common": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-common/-/platformos-common-0.1.0.tgz", - "integrity": "sha512-ZTQn+NsHDaS82JnO9Pqt1XB5FGkP5HXI0DVofpWmU+yDM4btXDlUowi06W0PlRq2LlVdeP0gYfPhliCl2Oyrjg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@platformos/platformos-common/-/platformos-common-0.2.0.tgz", + "integrity": "sha512-AMGjBe/+R/8qKHv901G1im66JGx+ExzaXwEXB4kcuN96z/2r3/JhrYMbW6mdQ963t2e9PYpH8fOzIXFYbsD80g==", "license": "MIT", "dependencies": { "graphql": "^16.12.0", "js-yaml": "^4.1.1", - "vscode-uri": "^3.1.0" + "vscode-uri": "^3.1.0", + "yaml": "^2.8.2" } }, "node_modules/@platformos/platformos-graph": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-graph/-/platformos-graph-0.1.0.tgz", - "integrity": "sha512-msGQsiXv/pn3/o0rhmf9I60dHUFH+v8H3ISDlfE2JsgZZ7uecpD/+Gz821C/Z4ePiUwZMZ6QScQGBB+0+JwVFw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@platformos/platformos-graph/-/platformos-graph-0.2.0.tgz", + "integrity": "sha512-BMafobaE4eVaWk4X94SCF3p1UaMkTAdE3HtOXQw3rX7DdE4HKHP0KR2iBZf+QK7egu4uwCd0nPOSv8QpYVIOoQ==", "license": "MIT", "dependencies": { - "@platformos/liquid-html-parser": "^0.1.0", - "@platformos/platformos-check-common": "1.0.0", - "@platformos/platformos-common": "0.1.0", + "@platformos/liquid-html-parser": "^0.2.0", + "@platformos/platformos-check-common": "1.1.0", + "@platformos/platformos-common": "0.2.0", "acorn": "^8.16.0", "js-yaml": "^4.1.1", "vscode-uri": "^3.1.0" @@ -1383,15 +1384,15 @@ } }, "node_modules/@platformos/platformos-language-server-common": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-language-server-common/-/platformos-language-server-common-0.1.0.tgz", - "integrity": "sha512-jsAe3ntddKTUaKrE6i3tTRRANW0vzVfh6nJLKv8ntEWp8YkrRATU1FeJs/RhGDycCKJ2gQZldm7tCkGlj7ukNQ==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@platformos/platformos-language-server-common/-/platformos-language-server-common-0.1.1.tgz", + "integrity": "sha512-sOILqjW9ZlYp/YOLYfrOESW0bo9YXKeOdz7MDdIwKL+MPODV8IyDZqZG1p5wCwUe7zCZ0h8gLNNm5NNgfvwh2w==", "license": "MIT", "dependencies": { - "@platformos/liquid-html-parser": "^0.1.0", - "@platformos/platformos-check-common": "1.0.0", - "@platformos/platformos-common": "0.1.0", - "@platformos/platformos-graph": "0.1.0", + "@platformos/liquid-html-parser": "^0.2.0", + "@platformos/platformos-check-common": "1.1.0", + "@platformos/platformos-common": "0.2.0", + "@platformos/platformos-graph": "0.2.0", "@vscode/web-custom-data": "^0.4.6", "graphql": "^16.12.0", "graphql-language-service": "^5.2.2", @@ -1403,33 +1404,33 @@ } }, "node_modules/@platformos/platformos-language-server-node": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-language-server-node/-/platformos-language-server-node-0.1.0.tgz", - "integrity": "sha512-9eUoua6rSkIpJ3Crgeb2V9MSGc3yGNJWxBGHiOy/Rq5zha7K01PWCaATs6QW9CIb3oTbBgeUMu66WR6ID/WOdg==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@platformos/platformos-language-server-node/-/platformos-language-server-node-0.1.1.tgz", + "integrity": "sha512-kTf0BQDhobCQP4TTsMANKAUxU8YPph8OCnHRUsh/x2EpgEqTyiHGw4MrVNLeC5UtzImpSEsHXRayQE4tOqnIZg==", "license": "MIT", "dependencies": { - "@platformos/platformos-check-docs-updater": "1.0.0", - "@platformos/platformos-check-node": "1.0.0", - "@platformos/platformos-common": "0.1.0", - "@platformos/platformos-language-server-common": "0.1.0", + "@platformos/platformos-check-docs-updater": "1.1.0", + "@platformos/platformos-check-node": "1.1.0", + "@platformos/platformos-common": "0.2.0", + "@platformos/platformos-language-server-common": "0.1.1", "glob": "^13.0.0", "vscode-languageserver": "^9.0.1", "vscode-uri": "^3.1.0" } }, "node_modules/@platformos/platformos-mcp-supervisor": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@platformos/platformos-mcp-supervisor/-/platformos-mcp-supervisor-0.1.0.tgz", - "integrity": "sha512-7etJU16i5SQFpNqrMTwgydfkhGQ9EmdOytEB6Lc4bcKOsiNEqRwmQFyrkpE1cnYHAhmDRAaGaHadA15IhjZ3yw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@platformos/platformos-mcp-supervisor/-/platformos-mcp-supervisor-0.2.0.tgz", + "integrity": "sha512-X+d1QQFhtI5UeOaQVzkl94xCe6FQ/SLmfr6xEL8XWrdcJb9blMYdEb0kydMf6L9uQolbMAQ5JdZn/ApzhhbtlA==", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.29.0", - "@platformos/liquid-html-parser": "0.1.0", - "@platformos/platformos-check-common": "1.0.0", - "@platformos/platformos-check-node": "1.0.0", - "@platformos/platformos-common": "0.1.0", - "@platformos/platformos-graph": "0.1.0", - "@platformos/platformos-language-server-common": "0.1.0", + "@platformos/liquid-html-parser": "0.2.0", + "@platformos/platformos-check-common": "1.1.0", + "@platformos/platformos-check-node": "1.1.0", + "@platformos/platformos-common": "0.2.0", + "@platformos/platformos-graph": "0.2.0", + "@platformos/platformos-language-server-common": "0.1.1", "zod": "^3.23.8" }, "bin": { @@ -4266,9 +4267,9 @@ } }, "node_modules/graphql-language-service": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.5.2.tgz", - "integrity": "sha512-NJhgEKTArkyNPcy4NRUFdbpNs5/F99LcvXbNtmGzNGwwruN8tBE3YPMjpYmp8KpBQtOx3uSuvXJlOOE3Vy2KRQ==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.7.0.tgz", + "integrity": "sha512-5mwDb9HyHxMcO9RCLLieg6rC1u9XKJKWhFuvaZFJi3broQZDz1fcFNlm96UCMrIgI6MSsb9RwwqKKp2sZOZ9Gw==", "license": "MIT", "dependencies": { "debounce-promise": "^3.1.2", @@ -8662,15 +8663,15 @@ "license": "MIT" }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.14.tgz", + "integrity": "sha512-EQyqJMi552E4ZTf46izQ4Fj6XquqxCySR3J5ZSD1SisMf6RfpeOWHxGBE8Gr6V0/3GHIGdAzDn8F8+1nTGCnoQ==", "license": "MIT" }, "node_modules/vscode-languageserver-types": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.18.0.tgz", - "integrity": "sha512-8TsGPNMIMiiBdkORgRSvLjuiEIiAFtO+KssmYWxQ+uSVvlf7RjK8YKCOjPzZ+YA04jXEV7+7LvkSmHkhpNS99g==", + "version": "3.18.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.18.3.tgz", + "integrity": "sha512-XIlzJ7Qp/jzSI1ds7/FwPAWrPeTZA7pAtlW4hdJ1J6xXWJL6dR9QYnDhJOdLzdKhUQ5Mm6mvUMw+3DcOQQasPw==", "license": "MIT" }, "node_modules/vscode-uri": { diff --git a/package.json b/package.json index 14cf5829..4940ea88 100644 --- a/package.json +++ b/package.json @@ -41,10 +41,10 @@ ], "dependencies": { "@inquirer/prompts": "^8.7.0", - "@platformos/platformos-check-node": "^1.0.0", - "@platformos/platformos-common": "^0.1.0", - "@platformos/platformos-language-server-node": "^0.1.0", - "@platformos/platformos-mcp-supervisor": "^0.1.0", + "@platformos/platformos-check-node": "^1.1.0", + "@platformos/platformos-common": "^0.2.0", + "@platformos/platformos-language-server-node": "^0.1.1", + "@platformos/platformos-mcp-supervisor": "^0.2.0", "ajv": "^8.20.0", "ajv-formats": "^3.0.1", "async": "^3.2.6", diff --git a/test/integration/check.test.js b/test/integration/check.test.js index 3589b312..2bcf4e9a 100644 --- a/test/integration/check.test.js +++ b/test/integration/check.test.js @@ -231,7 +231,7 @@ describe('pos-cli check run', () => { const configContent = fs.readFileSync(configPath, 'utf8'); expect(configContent).toMatch('extends: platformos-check:recommended'); expect(configContent).toMatch('ignore:'); - expect(configContent).toMatch('- node_modules/**'); + expect(configContent).toMatch('- node_modules'); expect(configContent).toMatch('# Below are all available settings'); } finally { // Cleanup