From e34cfc1a895b6bc4f88a343994a9e23f0b2ded8b Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Wed, 5 Jun 2024 07:34:39 -0400 Subject: [PATCH] build: update biomejs (#1138) Signed-off-by: Adam Setch --- analyzer.js | 2 +- biome.json | 2 +- package.json | 8 +++--- pnpm-lock.yaml | 74 +++++++++++++++++++++++++------------------------- utils.js | 4 +-- 5 files changed, 44 insertions(+), 46 deletions(-) diff --git a/analyzer.js b/analyzer.js index 60d45c6c9..eca518f22 100644 --- a/analyzer.js +++ b/analyzer.js @@ -292,7 +292,7 @@ export const findJSImportsExports = async (src, deep) => { const errFiles = []; try { const promiseMap = await getAllSrcJSAndTSFiles(src, deep); - const srcFiles = promiseMap.flatMap((d) => d); + const srcFiles = promiseMap.flat(); for (const file of srcFiles) { try { parseFileASTTree(src, file, allImports, allExports); diff --git a/biome.json b/biome.json index bd04b8a34..7a57aa11f 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.7.0/schema.json", + "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json", "organizeImports": { "enabled": true }, diff --git a/package.json b/package.json index 478604931..37973b250 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,9 @@ "scripts": { "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --inject-globals false docker.test.js utils.test.js display.test.js postgen.test.js", "watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch --inject-globals false", - "lint:check": "biome check *", - "lint": "biome check --apply *", - "lint:errors": "biome check * --diagnostic-level=error", + "lint:check": "biome check", + "lint": "biome check --fix", + "lint:errors": "biome check --diagnostic-level=error", "gen-types": "npx -p typescript tsc" }, "engines": { @@ -112,7 +112,7 @@ }, "files": ["*.js", "bin/", "data/", "types/"], "devDependencies": { - "@biomejs/biome": "1.7.3", + "@biomejs/biome": "1.8.0", "jest": "^29.7.0", "typescript": "^5.4.5" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54375ced0..ef8992cef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,8 +131,8 @@ importers: version: 5.1.7 devDependencies: '@biomejs/biome': - specifier: 1.7.3 - version: 1.7.3 + specifier: 1.8.0 + version: 1.8.0 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@20.14.0) @@ -322,55 +322,55 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@biomejs/biome@1.7.3': - resolution: {integrity: sha512-ogFQI+fpXftr+tiahA6bIXwZ7CSikygASdqMtH07J2cUzrpjyTMVc9Y97v23c7/tL1xCZhM+W9k4hYIBm7Q6cQ==} + '@biomejs/biome@1.8.0': + resolution: {integrity: sha512-34xcE2z8GWrIz1sCFEmlHT/+4d+SN7YOqqvzlAKXKvaWPRJ2/NUwxPbRsP01P9QODkQ5bvGvc9rpBihmP+7RJQ==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.7.3': - resolution: {integrity: sha512-eDvLQWmGRqrPIRY7AIrkPHkQ3visEItJKkPYSHCscSDdGvKzYjmBJwG1Gu8+QC5ed6R7eiU63LEC0APFBobmfQ==} + '@biomejs/cli-darwin-arm64@1.8.0': + resolution: {integrity: sha512-dBAYzfIJ1JmWigKlWourT3sJ3I60LZPjqNwwlsyFjiv5AV7vPeWlHVVIImV2BpINwNjZQhpXnwDfVnGS4vr7AA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.7.3': - resolution: {integrity: sha512-JXCaIseKRER7dIURsVlAJacnm8SG5I0RpxZ4ya3dudASYUc68WGl4+FEN03ABY3KMIq7hcK1tzsJiWlmXyosZg==} + '@biomejs/cli-darwin-x64@1.8.0': + resolution: {integrity: sha512-ZTTSD0bP0nn9UpRDGQrQNTILcYSj+IkxTYr3CAV64DWBDtQBomlk2oVKWzDaA1LOhpAsTh0giLCbPJaVk2jfMQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.7.3': - resolution: {integrity: sha512-c8AlO45PNFZ1BYcwaKzdt46kYbuP6xPGuGQ6h4j3XiEDpyseRRUy/h+6gxj07XovmyxKnSX9GSZ6nVbZvcVUAw==} + '@biomejs/cli-linux-arm64-musl@1.8.0': + resolution: {integrity: sha512-+ee/pZWsvhDv6eRI00krRNSgAg8DKSxzOv3LUsCjto6N1VzqatTASeQv2HRfG1nitf79rRKM75LkMJbqEfiKww==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.7.3': - resolution: {integrity: sha512-phNTBpo7joDFastnmZsFjYcDYobLTx4qR4oPvc9tJ486Bd1SfEVPHEvJdNJrMwUQK56T+TRClOQd/8X1nnjA9w==} + '@biomejs/cli-linux-arm64@1.8.0': + resolution: {integrity: sha512-cx725jTlJS6dskvJJwwCQaaMRBKE2Qss7ukzmx27Rn/DXRxz6tnnBix4FUGPf1uZfwrERkiJlbWM05JWzpvvXg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.7.3': - resolution: {integrity: sha512-UdEHKtYGWEX3eDmVWvQeT+z05T9/Sdt2+F/7zmMOFQ7boANeX8pcO6EkJPK3wxMudrApsNEKT26rzqK6sZRTRA==} + '@biomejs/cli-linux-x64-musl@1.8.0': + resolution: {integrity: sha512-VPA4ocrAOak50VYl8gOAVnjuFFDpIUolShntc/aWM0pZfSIMbRucxnrfUfp44EVwayxjK6ruJTR5xEWj93WvDA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.7.3': - resolution: {integrity: sha512-vnedYcd5p4keT3iD48oSKjOIRPYcjSNNbd8MO1bKo9ajg3GwQXZLAH+0Cvlr+eMsO67/HddWmscSQwTFrC/uPA==} + '@biomejs/cli-linux-x64@1.8.0': + resolution: {integrity: sha512-cmgmhlD4QUxMhL1VdaNqnB81xBHb3R7huVNyYnPYzP+AykZ7XqJbPd1KcWAszNjUk2AHdx0aLKEBwCOWemxb2g==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.7.3': - resolution: {integrity: sha512-unNCDqUKjujYkkSxs7gFIfdasttbDC4+z0kYmcqzRk6yWVoQBL4dNLcCbdnJS+qvVDNdI9rHp2NwpQ0WAdla4Q==} + '@biomejs/cli-win32-arm64@1.8.0': + resolution: {integrity: sha512-J31spvlh39FfRHQacYXxJX9PvTCH/a8+2Jx9D1lxw+LSF0JybqZcw/4JrlFUWUl4kF3yv8AuYUK0sENScc3g9w==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.7.3': - resolution: {integrity: sha512-ZmByhbrnmz/UUFYB622CECwhKIPjJLLPr5zr3edhu04LzbfcOrz16VYeNq5dpO1ADG70FORhAJkaIGdaVBG00w==} + '@biomejs/cli-win32-x64@1.8.0': + resolution: {integrity: sha512-uPHHvu76JC1zYe9zZDcOU9PAg+1MZmPuNgWkb5jljaDeATvzLFPB+0nuJTilf603LXL+E8IdPQAO61Wy2VuEJA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -2908,39 +2908,39 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@biomejs/biome@1.7.3': + '@biomejs/biome@1.8.0': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.7.3 - '@biomejs/cli-darwin-x64': 1.7.3 - '@biomejs/cli-linux-arm64': 1.7.3 - '@biomejs/cli-linux-arm64-musl': 1.7.3 - '@biomejs/cli-linux-x64': 1.7.3 - '@biomejs/cli-linux-x64-musl': 1.7.3 - '@biomejs/cli-win32-arm64': 1.7.3 - '@biomejs/cli-win32-x64': 1.7.3 + '@biomejs/cli-darwin-arm64': 1.8.0 + '@biomejs/cli-darwin-x64': 1.8.0 + '@biomejs/cli-linux-arm64': 1.8.0 + '@biomejs/cli-linux-arm64-musl': 1.8.0 + '@biomejs/cli-linux-x64': 1.8.0 + '@biomejs/cli-linux-x64-musl': 1.8.0 + '@biomejs/cli-win32-arm64': 1.8.0 + '@biomejs/cli-win32-x64': 1.8.0 - '@biomejs/cli-darwin-arm64@1.7.3': + '@biomejs/cli-darwin-arm64@1.8.0': optional: true - '@biomejs/cli-darwin-x64@1.7.3': + '@biomejs/cli-darwin-x64@1.8.0': optional: true - '@biomejs/cli-linux-arm64-musl@1.7.3': + '@biomejs/cli-linux-arm64-musl@1.8.0': optional: true - '@biomejs/cli-linux-arm64@1.7.3': + '@biomejs/cli-linux-arm64@1.8.0': optional: true - '@biomejs/cli-linux-x64-musl@1.7.3': + '@biomejs/cli-linux-x64-musl@1.8.0': optional: true - '@biomejs/cli-linux-x64@1.7.3': + '@biomejs/cli-linux-x64@1.8.0': optional: true - '@biomejs/cli-win32-arm64@1.7.3': + '@biomejs/cli-win32-arm64@1.8.0': optional: true - '@biomejs/cli-win32-x64@1.7.3': + '@biomejs/cli-win32-x64@1.8.0': optional: true '@bufbuild/protobuf@1.7.2': diff --git a/utils.js b/utils.js index 749f3bd09..97f77b5d6 100644 --- a/utils.js +++ b/utils.js @@ -10277,9 +10277,7 @@ async function queryNuget(p, NUGET_URL) { let version = `${tmpVersion.major}.${tmpVersion.minor}.${tmpVersion.patch}`; if (compare(version, upper) === 1) { if (tmpVersion.patch > 0) { - version = `${tmpVersion.major}.${tmpVersion.minor}.${( - tmpVersion.patch - 1 - ).toString()}`; + version = `${tmpVersion.major}.${tmpVersion.minor}.${(tmpVersion.patch - 1).toString()}`; } } return version;