From 004117cc51bc7984313130725acdb4aacbe82ceb Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Fri, 6 Dec 2024 04:47:59 +0900 Subject: [PATCH 1/4] Update React to v19 Signed-off-by: Sora Morimoto --- astexplorer/package.json | 4 +- astexplorer/src/components/ASTOutput.js | 2 +- .../src/components/visualization/Tree.js | 8 +- .../components/visualization/tree/Element.js | 10 +- astexplorer/src/index.js | 6 +- astexplorer/src/parserMiddleware.js | 2 +- biome.json | 5 +- yarn.lock | 444 ++++++++---------- 8 files changed, 226 insertions(+), 255 deletions(-) diff --git a/astexplorer/package.json b/astexplorer/package.json index f27bd2762..6f84b4210 100644 --- a/astexplorer/package.json +++ b/astexplorer/package.json @@ -14,8 +14,8 @@ "json-stringify-safe": "5.0.1", "process": "0.11.10", "prop-types": "15.8.1", - "react": "18.3.1", - "react-dom": "18.3.1", + "react": "19.0.0", + "react-dom": "19.0.0", "react-redux": "9.1.2" }, "devDependencies": { diff --git a/astexplorer/src/components/ASTOutput.js b/astexplorer/src/components/ASTOutput.js index 9fd4278db..e6d8d2e62 100644 --- a/astexplorer/src/components/ASTOutput.js +++ b/astexplorer/src/components/ASTOutput.js @@ -1,8 +1,8 @@ import PropTypes from "prop-types"; import React from "react"; import cx from "../utils/classnames.js"; -import visualizations from "./visualization"; import { vscode } from "../vscode"; +import visualizations from "./visualization"; const { useState } = React; diff --git a/astexplorer/src/components/visualization/Tree.js b/astexplorer/src/components/visualization/Tree.js index e3ab51288..17cac65c5 100644 --- a/astexplorer/src/components/visualization/Tree.js +++ b/astexplorer/src/components/visualization/Tree.js @@ -1,12 +1,12 @@ -import Element from "./tree/Element"; import PropTypes from "prop-types"; import React from "react"; -import { publish } from "../../utils/pubsub.js"; -import { logEvent } from "../../utils/logger"; import { treeAdapterFromParseResult } from "../../core/TreeAdapter.js"; +import { logEvent } from "../../utils/logger"; +import { publish } from "../../utils/pubsub.js"; +import { vscode } from "../../vscode"; import { SelectedNodeProvider } from "./SelectedNodeContext.js"; import focusNodes from "./focusNodes.js"; -import { vscode } from "../../vscode"; +import Element from "./tree/Element"; import "./css/tree.css"; diff --git a/astexplorer/src/components/visualization/tree/Element.js b/astexplorer/src/components/visualization/tree/Element.js index ec87212aa..cb74fdd4e 100644 --- a/astexplorer/src/components/visualization/tree/Element.js +++ b/astexplorer/src/components/visualization/tree/Element.js @@ -1,13 +1,13 @@ -import CompactArrayView from "./CompactArrayView"; -import CompactObjectView from "./CompactObjectView"; import PropTypes from "prop-types"; -import { publish } from "../../../utils/pubsub.js"; import React from "react"; -import { useSelectedNode } from "../SelectedNodeContext.js"; -import focusNodes from "../focusNodes.js"; import cx from "../../../utils/classnames.js"; +import { publish } from "../../../utils/pubsub.js"; import stringify from "../../../utils/stringify"; import { vscode } from "../../../vscode.js"; +import { useSelectedNode } from "../SelectedNodeContext.js"; +import focusNodes from "../focusNodes.js"; +import CompactArrayView from "./CompactArrayView"; +import CompactObjectView from "./CompactObjectView"; const { useState, useRef, useMemo, useCallback, useEffect } = React; function usePrevious(value, initialValue) { diff --git a/astexplorer/src/index.js b/astexplorer/src/index.js index d07743800..10afe7331 100644 --- a/astexplorer/src/index.js +++ b/astexplorer/src/index.js @@ -1,5 +1,5 @@ import React from "react"; -import ReactDOM from "react-dom"; +import ReactDOM from "react-dom/client"; import InteractorFactory from "./Interaction/InteractorFactory"; import ASTOutput from "./components/ASTOutput"; import getTreeAdapter from "./parserMiddleware"; @@ -93,4 +93,6 @@ class Index extends React.Component { } } -ReactDOM.render(, document.getElementById("index")); +const root = ReactDOM.createRoot(document.getElementById("index")); + +root.render(); diff --git a/astexplorer/src/parserMiddleware.js b/astexplorer/src/parserMiddleware.js index cc0755b1f..876ff5756 100644 --- a/astexplorer/src/parserMiddleware.js +++ b/astexplorer/src/parserMiddleware.js @@ -1,7 +1,7 @@ import { + emptyKeysFilter, ignoreKeysFilter, locationInformationFilter, - emptyKeysFilter, typeKeysFilter, } from "./core/TreeAdapter.js"; diff --git a/biome.json b/biome.json index 00dd5154d..22c4719c9 100644 --- a/biome.json +++ b/biome.json @@ -1,14 +1,13 @@ { "$schema": "node_modules/@biomejs/biome/configuration_schema.json", - "files": { - "ignore": ["astexplorer", "esy.lock", "package.json"] - }, "formatter": { "enabled": true, + "ignore": ["package.json"], "useEditorconfig": true }, "linter": { "enabled": true, + "ignore": ["astexplorer"], "rules": { "recommended": true } diff --git a/yarn.lock b/yarn.lock index 523c4da8a..aaa36bce6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -431,6 +431,15 @@ __metadata: languageName: node linkType: hard +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 + languageName: node + linkType: hard + "@istanbuljs/schema@npm:^0.1.2, @istanbuljs/schema@npm:^0.1.3": version: 0.1.3 resolution: "@istanbuljs/schema@npm:0.1.3" @@ -573,25 +582,25 @@ __metadata: languageName: node linkType: hard -"@npmcli/agent@npm:^2.0.0": - version: 2.2.2 - resolution: "@npmcli/agent@npm:2.2.2" +"@npmcli/agent@npm:^3.0.0": + version: 3.0.0 + resolution: "@npmcli/agent@npm:3.0.0" dependencies: agent-base: "npm:^7.1.0" http-proxy-agent: "npm:^7.0.0" https-proxy-agent: "npm:^7.0.1" lru-cache: "npm:^10.0.1" socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/325e0db7b287d4154ecd164c0815c08007abfb07653cc57bceded17bb7fd240998a3cbdbe87d700e30bef494885eccc725ab73b668020811d56623d145b524ae + checksum: 10c0/efe37b982f30740ee77696a80c196912c274ecd2cb243bc6ae7053a50c733ce0f6c09fda085145f33ecf453be19654acca74b69e81eaad4c90f00ccffe2f9271 languageName: node linkType: hard -"@npmcli/fs@npm:^3.1.0": - version: 3.1.1 - resolution: "@npmcli/fs@npm:3.1.1" +"@npmcli/fs@npm:^4.0.0": + version: 4.0.0 + resolution: "@npmcli/fs@npm:4.0.0" dependencies: semver: "npm:^7.3.5" - checksum: 10c0/c37a5b4842bfdece3d14dfdb054f73fe15ed2d3da61b34ff76629fb5b1731647c49166fd2a8bf8b56fcfa51200382385ea8909a3cbecdad612310c114d3f6c99 + checksum: 10c0/c90935d5ce670c87b6b14fab04a965a3b8137e585f8b2a6257263bd7f97756dd736cb165bb470e5156a9e718ecd99413dccc54b1138c1a46d6ec7cf325982fe5 languageName: node linkType: hard @@ -1470,90 +1479,90 @@ __metadata: languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-darwin-arm64@npm:1.9.3" +"@swc/core-darwin-arm64@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-darwin-arm64@npm:1.10.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-darwin-x64@npm:1.9.3" +"@swc/core-darwin-x64@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-darwin-x64@npm:1.10.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.9.3" +"@swc/core-linux-arm-gnueabihf@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.10.0" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-linux-arm64-gnu@npm:1.9.3" +"@swc/core-linux-arm64-gnu@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-linux-arm64-gnu@npm:1.10.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-linux-arm64-musl@npm:1.9.3" +"@swc/core-linux-arm64-musl@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-linux-arm64-musl@npm:1.10.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-linux-x64-gnu@npm:1.9.3" +"@swc/core-linux-x64-gnu@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-linux-x64-gnu@npm:1.10.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-linux-x64-musl@npm:1.9.3" +"@swc/core-linux-x64-musl@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-linux-x64-musl@npm:1.10.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-win32-arm64-msvc@npm:1.9.3" +"@swc/core-win32-arm64-msvc@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-win32-arm64-msvc@npm:1.10.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-win32-ia32-msvc@npm:1.9.3" +"@swc/core-win32-ia32-msvc@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-win32-ia32-msvc@npm:1.10.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.9.3": - version: 1.9.3 - resolution: "@swc/core-win32-x64-msvc@npm:1.9.3" +"@swc/core-win32-x64-msvc@npm:1.10.0": + version: 1.10.0 + resolution: "@swc/core-win32-x64-msvc@npm:1.10.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@swc/core@npm:^1.7.26": - version: 1.9.3 - resolution: "@swc/core@npm:1.9.3" - dependencies: - "@swc/core-darwin-arm64": "npm:1.9.3" - "@swc/core-darwin-x64": "npm:1.9.3" - "@swc/core-linux-arm-gnueabihf": "npm:1.9.3" - "@swc/core-linux-arm64-gnu": "npm:1.9.3" - "@swc/core-linux-arm64-musl": "npm:1.9.3" - "@swc/core-linux-x64-gnu": "npm:1.9.3" - "@swc/core-linux-x64-musl": "npm:1.9.3" - "@swc/core-win32-arm64-msvc": "npm:1.9.3" - "@swc/core-win32-ia32-msvc": "npm:1.9.3" - "@swc/core-win32-x64-msvc": "npm:1.9.3" + version: 1.10.0 + resolution: "@swc/core@npm:1.10.0" + dependencies: + "@swc/core-darwin-arm64": "npm:1.10.0" + "@swc/core-darwin-x64": "npm:1.10.0" + "@swc/core-linux-arm-gnueabihf": "npm:1.10.0" + "@swc/core-linux-arm64-gnu": "npm:1.10.0" + "@swc/core-linux-arm64-musl": "npm:1.10.0" + "@swc/core-linux-x64-gnu": "npm:1.10.0" + "@swc/core-linux-x64-musl": "npm:1.10.0" + "@swc/core-win32-arm64-msvc": "npm:1.10.0" + "@swc/core-win32-ia32-msvc": "npm:1.10.0" + "@swc/core-win32-x64-msvc": "npm:1.10.0" "@swc/counter": "npm:^0.1.3" "@swc/types": "npm:^0.1.17" peerDependencies: @@ -1582,7 +1591,7 @@ __metadata: peerDependenciesMeta: "@swc/helpers": optional: true - checksum: 10c0/a9507a5be580518d51cf7f41821a89e1044be6f72930efbdf3877366c27e9ff1dbca3e1a7f18698679f8c345b6698f43cd80d7dfa24ba30dcab493de9b7a336e + checksum: 10c0/5c1720fc94ffcd430b8f73fb87dc0f77c2aef18ef2536483af82094d88f773d054638c7c751909397a507223971a86f4a74cb02888e0b857ca6fcd59659f8f54 languageName: node linkType: hard @@ -1847,16 +1856,6 @@ __metadata: languageName: node linkType: hard -"aggregate-error@npm:^3.0.0": - version: 3.1.0 - resolution: "aggregate-error@npm:3.1.0" - dependencies: - clean-stack: "npm:^2.0.0" - indent-string: "npm:^4.0.0" - checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039 - languageName: node - linkType: hard - "ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" @@ -1929,8 +1928,8 @@ __metadata: parcel: "npm:2.13.2" process: "npm:0.11.10" prop-types: "npm:15.8.1" - react: "npm:18.3.1" - react-dom: "npm:18.3.1" + react: "npm:19.0.0" + react-dom: "npm:19.0.0" react-redux: "npm:9.1.2" languageName: unknown linkType: soft @@ -2115,11 +2114,11 @@ __metadata: languageName: node linkType: hard -"cacache@npm:^18.0.0": - version: 18.0.4 - resolution: "cacache@npm:18.0.4" +"cacache@npm:^19.0.1": + version: 19.0.1 + resolution: "cacache@npm:19.0.1" dependencies: - "@npmcli/fs": "npm:^3.1.0" + "@npmcli/fs": "npm:^4.0.0" fs-minipass: "npm:^3.0.0" glob: "npm:^10.2.2" lru-cache: "npm:^10.0.1" @@ -2127,11 +2126,11 @@ __metadata: minipass-collect: "npm:^2.0.1" minipass-flush: "npm:^1.0.5" minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^4.0.0" - ssri: "npm:^10.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^3.0.0" - checksum: 10c0/6c055bafed9de4f3dcc64ac3dc7dd24e863210902b7c470eb9ce55a806309b3efff78033e3d8b4f7dcc5d467f2db43c6a2857aaaf26f0094b8a351d44c42179f + p-map: "npm:^7.0.2" + ssri: "npm:^12.0.0" + tar: "npm:^7.4.3" + unique-filename: "npm:^4.0.0" + checksum: 10c0/01f2134e1bd7d3ab68be851df96c8d63b492b1853b67f2eecb2c37bb682d37cb70bb858a16f2f0554d3c0071be6dfe21456a1ff6fa4b7eed996570d6a25ffe9c languageName: node linkType: hard @@ -2163,9 +2162,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001669": - version: 1.0.30001685 - resolution: "caniuse-lite@npm:1.0.30001685" - checksum: 10c0/cd0dcc5080dd0f3502d68938fbbe15383ae9176cc9b87016587f4abd1099298df04324818c126cda16cd7082bc3b8f91d15fa1918f8484fb964147f4c69efa28 + version: 1.0.30001686 + resolution: "caniuse-lite@npm:1.0.30001686" + checksum: 10c0/41748e81c17c1a6a0fd6e515c93c8620004171fe6706027e45f837fde71e97173e85141b0dc11e07d53b4782f3741a6651cb0f7d395cc1c1860892355eabdfa2 languageName: node linkType: hard @@ -2256,10 +2255,10 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^2.0.0": - version: 2.0.0 - resolution: "chownr@npm:2.0.0" - checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 +"chownr@npm:^3.0.0": + version: 3.0.0 + resolution: "chownr@npm:3.0.0" + checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 languageName: node linkType: hard @@ -2277,13 +2276,6 @@ __metadata: languageName: node linkType: hard -"clean-stack@npm:^2.0.0": - version: 2.2.0 - resolution: "clean-stack@npm:2.2.0" - checksum: 10c0/1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1 - languageName: node - linkType: hard - "cli-cursor@npm:^4.0.0": version: 4.0.0 resolution: "cli-cursor@npm:4.0.0" @@ -2622,9 +2614,9 @@ __metadata: linkType: hard "dotenv@npm:^16.4.5": - version: 16.4.5 - resolution: "dotenv@npm:16.4.5" - checksum: 10c0/48d92870076832af0418b13acd6e5a5a3e83bb00df690d9812e94b24aff62b88ade955ac99a05501305b8dc8f1b0ee7638b18493deb6fe93d680e5220936292f + version: 16.4.7 + resolution: "dotenv@npm:16.4.7" + checksum: 10c0/be9f597e36a8daf834452daa1f4cc30e5375a5968f98f46d89b16b983c567398a330580c88395069a77473943c06b877d1ca25b4afafcdd6d4adb549e8293462 languageName: node linkType: hard @@ -2645,9 +2637,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.5.41": - version: 1.5.67 - resolution: "electron-to-chromium@npm:1.5.67" - checksum: 10c0/bcd21c3961267fd733973586045a38d41f697e6821e7624cdd39d48fd744d9bd93ec7db59abbafeb464861218b959a920892cfaa719bff4441d1d49f8dcdff94 + version: 1.5.71 + resolution: "electron-to-chromium@npm:1.5.71" + checksum: 10c0/f6fdeec0e1d68634cf92c267bdce3e50af947ce2c8fb1034df3e738c536b3033e311ad0fb9a6c4c35f678f10a299e4f78fdfcedbaa78d8992fedc443a7363d6d languageName: node linkType: hard @@ -2977,15 +2969,6 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^2.0.0": - version: 2.1.0 - resolution: "fs-minipass@npm:2.1.0" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 - languageName: node - linkType: hard - "fs-minipass@npm:^3.0.0": version: 3.0.3 resolution: "fs-minipass@npm:3.0.3" @@ -3071,7 +3054,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -3140,11 +3123,9 @@ __metadata: linkType: hard "gopd@npm:^1.0.1": - version: 1.1.0 - resolution: "gopd@npm:1.1.0" - dependencies: - get-intrinsic: "npm:^1.2.4" - checksum: 10c0/acfa9914889700cf42eaf676e1dc2d5a277217580e36119a9a6f5b77197700fd8294b8994f257963845820e7b414c8f06e1b9f8dff6456b0f71f61d175fecf3c + version: 1.2.0 + resolution: "gopd@npm:1.2.0" + checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead languageName: node linkType: hard @@ -3188,9 +3169,9 @@ __metadata: linkType: hard "has-symbols@npm:^1.0.3": - version: 1.0.3 - resolution: "has-symbols@npm:1.0.3" - checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 + version: 1.1.0 + resolution: "has-symbols@npm:1.1.0" + checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e languageName: node linkType: hard @@ -3356,13 +3337,6 @@ __metadata: languageName: node linkType: hard -"indent-string@npm:^4.0.0": - version: 4.0.0 - resolution: "indent-string@npm:4.0.0" - checksum: 10c0/1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f - languageName: node - linkType: hard - "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -3470,13 +3444,6 @@ __metadata: languageName: node linkType: hard -"is-lambda@npm:^1.0.1": - version: 1.0.1 - resolution: "is-lambda@npm:1.0.1" - checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d - languageName: node - linkType: hard - "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" @@ -3978,7 +3945,7 @@ __metadata: languageName: node linkType: hard -"loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": +"loose-envify@npm:^1.4.0": version: 1.4.0 resolution: "loose-envify@npm:1.4.0" dependencies: @@ -4021,23 +3988,22 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.0": - version: 13.0.1 - resolution: "make-fetch-happen@npm:13.0.1" +"make-fetch-happen@npm:^14.0.3": + version: 14.0.3 + resolution: "make-fetch-happen@npm:14.0.3" dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" + "@npmcli/agent": "npm:^3.0.0" + cacache: "npm:^19.0.1" http-cache-semantics: "npm:^4.1.1" - is-lambda: "npm:^1.0.1" minipass: "npm:^7.0.2" - minipass-fetch: "npm:^3.0.0" + minipass-fetch: "npm:^4.0.0" minipass-flush: "npm:^1.0.5" minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - proc-log: "npm:^4.2.0" + negotiator: "npm:^1.0.0" + proc-log: "npm:^5.0.0" promise-retry: "npm:^2.0.1" - ssri: "npm:^10.0.0" - checksum: 10c0/df5f4dbb6d98153b751bccf4dc4cc500de85a96a9331db9805596c46aa9f99d9555983954e6c1266d9f981ae37a9e4647f42b9a4bb5466f867f4012e582c9e7e + ssri: "npm:^12.0.0" + checksum: 10c0/c40efb5e5296e7feb8e37155bde8eb70bc57d731b1f7d90e35a092fde403d7697c56fb49334d92d330d6f1ca29a98142036d6480a12681133a0a1453164cb2f0 languageName: node linkType: hard @@ -4165,18 +4131,18 @@ __metadata: languageName: node linkType: hard -"minipass-fetch@npm:^3.0.0": - version: 3.0.5 - resolution: "minipass-fetch@npm:3.0.5" +"minipass-fetch@npm:^4.0.0": + version: 4.0.0 + resolution: "minipass-fetch@npm:4.0.0" dependencies: encoding: "npm:^0.1.13" minipass: "npm:^7.0.3" minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" + minizlib: "npm:^3.0.1" dependenciesMeta: encoding: optional: true - checksum: 10c0/9d702d57f556274286fdd97e406fc38a2f5c8d15e158b498d7393b1105974b21249289ec571fa2b51e038a4872bfc82710111cf75fae98c662f3d6f95e72152b + checksum: 10c0/7fa30ce7c373fb6f94c086b374fff1589fd7e78451855d2d06c2e2d9df936d131e73e952163063016592ed3081444bd8d1ea608533313b0149156ce23311da4b languageName: node linkType: hard @@ -4216,27 +4182,20 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0": - version: 5.0.0 - resolution: "minipass@npm:5.0.0" - checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 languageName: node linkType: hard -"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": - version: 2.1.2 - resolution: "minizlib@npm:2.1.2" +"minizlib@npm:^3.0.1": + version: 3.0.1 + resolution: "minizlib@npm:3.0.1" dependencies: - minipass: "npm:^3.0.0" - yallist: "npm:^4.0.0" - checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 + minipass: "npm:^7.0.4" + rimraf: "npm:^5.0.5" + checksum: 10c0/82f8bf70da8af656909a8ee299d7ed3b3372636749d29e105f97f20e88971be31f5ed7642f2e898f00283b68b701cc01307401cdc209b0efc5dd3818220e5093 languageName: node linkType: hard @@ -4247,12 +4206,12 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^1.0.3": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" bin: - mkdirp: bin/cmd.js - checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf + mkdirp: dist/cjs/src/bin.js + checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d languageName: node linkType: hard @@ -4358,10 +4317,10 @@ __metadata: languageName: node linkType: hard -"negotiator@npm:^0.6.3": - version: 0.6.4 - resolution: "negotiator@npm:0.6.4" - checksum: 10c0/3e677139c7fb7628a6f36335bf11a885a62c21d5390204590a1a214a5631fcbe5ea74ef6a610b60afe84b4d975cbe0566a23f20ee17c77c73e74b80032108dea +"negotiator@npm:^1.0.0": + version: 1.0.0 + resolution: "negotiator@npm:1.0.0" + checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b languageName: node linkType: hard @@ -4428,22 +4387,22 @@ __metadata: linkType: hard "node-gyp@npm:latest": - version: 10.2.0 - resolution: "node-gyp@npm:10.2.0" + version: 11.0.0 + resolution: "node-gyp@npm:11.0.0" dependencies: env-paths: "npm:^2.2.0" exponential-backoff: "npm:^3.1.1" glob: "npm:^10.3.10" graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^13.0.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^4.1.0" + make-fetch-happen: "npm:^14.0.3" + nopt: "npm:^8.0.0" + proc-log: "npm:^5.0.0" semver: "npm:^7.3.5" - tar: "npm:^6.2.1" - which: "npm:^4.0.0" + tar: "npm:^7.4.3" + which: "npm:^5.0.0" bin: node-gyp: bin/node-gyp.js - checksum: 10c0/00630d67dbd09a45aee0a5d55c05e3916ca9e6d427ee4f7bc392d2d3dc5fad7449b21fc098dd38260a53d9dcc9c879b36704a1994235d4707e7271af7e9a835b + checksum: 10c0/a3b885bbee2d271f1def32ba2e30ffcf4562a3db33af06b8b365e053153e2dd2051b9945783c3c8e852d26a0f20f65b251c7e83361623383a99635c0280ee573 languageName: node linkType: hard @@ -4454,14 +4413,14 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.2.1 - resolution: "nopt@npm:7.2.1" +"nopt@npm:^8.0.0": + version: 8.0.0 + resolution: "nopt@npm:8.0.0" dependencies: abbrev: "npm:^2.0.0" bin: nopt: bin/nopt.js - checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 + checksum: 10c0/19cb986f79abaca2d0f0b560021da7b32ee6fcc3de48f3eaeb0c324d36755c17754f886a754c091f01f740c17caf7d6aea8237b7fbaf39f476ae5e30a249f18f languageName: node linkType: hard @@ -4612,12 +4571,10 @@ __metadata: languageName: node linkType: hard -"p-map@npm:^4.0.0": - version: 4.0.0 - resolution: "p-map@npm:4.0.0" - dependencies: - aggregate-error: "npm:^3.0.0" - checksum: 10c0/592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75 +"p-map@npm:^7.0.2": + version: 7.0.2 + resolution: "p-map@npm:7.0.2" + checksum: 10c0/e10548036648d1c043153f9997112fe5a7de54a319210238628f8ea22ee36587fd6ee740811f88b60bbf29d932e23ae35df7fced40df477116c84c18e797047e languageName: node linkType: hard @@ -4856,10 +4813,10 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": - version: 4.2.0 - resolution: "proc-log@npm:4.2.0" - checksum: 10c0/17db4757c2a5c44c1e545170e6c70a26f7de58feb985091fb1763f5081cab3d01b181fb2dd240c9f4a4255a1d9227d163d5771b7e69c9e49a561692db865efb9 +"proc-log@npm:^5.0.0": + version: 5.0.0 + resolution: "proc-log@npm:5.0.0" + checksum: 10c0/bbe5edb944b0ad63387a1d5b1911ae93e05ce8d0f60de1035b218cdcceedfe39dbd2c697853355b70f1a090f8f58fe90da487c85216bf9671f9499d1a897e9e3 languageName: node linkType: hard @@ -4947,15 +4904,14 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:18.3.1": - version: 18.3.1 - resolution: "react-dom@npm:18.3.1" +"react-dom@npm:19.0.0": + version: 19.0.0 + resolution: "react-dom@npm:19.0.0" dependencies: - loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.2" + scheduler: "npm:^0.25.0" peerDependencies: - react: ^18.3.1 - checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85 + react: ^19.0.0 + checksum: 10c0/a36ce7ab507b237ae2759c984cdaad4af4096d8199fb65b3815c16825e5cfeb7293da790a3fc2184b52bfba7ba3ff31c058c01947aff6fd1a3701632aabaa6a9 languageName: node linkType: hard @@ -4999,12 +4955,10 @@ __metadata: languageName: node linkType: hard -"react@npm:18.3.1": - version: 18.3.1 - resolution: "react@npm:18.3.1" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3 +"react@npm:19.0.0": + version: 19.0.0 + resolution: "react@npm:19.0.0" + checksum: 10c0/9cad8f103e8e3a16d15cb18a0d8115d8bd9f9e1ce3420310aea381eb42aa0a4f812cf047bb5441349257a05fba8a291515691e3cb51267279b2d2c3253f38471 languageName: node linkType: hard @@ -5097,6 +5051,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^5.0.5": + version: 5.0.10 + resolution: "rimraf@npm:5.0.10" + dependencies: + glob: "npm:^10.3.7" + bin: + rimraf: dist/esm/bin.mjs + checksum: 10c0/7da4fd0e15118ee05b918359462cfa1e7fe4b1228c7765195a45b55576e8c15b95db513b8466ec89129666f4af45ad978a3057a02139afba1a63512a2d9644cc + languageName: node + linkType: hard + "safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -5125,12 +5090,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.2": - version: 0.23.2 - resolution: "scheduler@npm:0.23.2" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78 +"scheduler@npm:^0.25.0": + version: 0.25.0 + resolution: "scheduler@npm:0.25.0" + checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe languageName: node linkType: hard @@ -5295,12 +5258,12 @@ __metadata: languageName: node linkType: hard -"ssri@npm:^10.0.0": - version: 10.0.6 - resolution: "ssri@npm:10.0.6" +"ssri@npm:^12.0.0": + version: 12.0.0 + resolution: "ssri@npm:12.0.0" dependencies: minipass: "npm:^7.0.3" - checksum: 10c0/e5a1e23a4057a86a97971465418f22ea89bd439ac36ade88812dd920e4e61873e8abd6a9b72a03a67ef50faa00a2daf1ab745c5a15b46d03e0544a0296354227 + checksum: 10c0/caddd5f544b2006e88fa6b0124d8d7b28208b83c72d7672d5ade44d794525d23b540f3396108c4eb9280dcb7c01f0bef50682f5b4b2c34291f7c5e211fd1417d languageName: node linkType: hard @@ -5469,17 +5432,17 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.2.1": - version: 6.2.1 - resolution: "tar@npm:6.2.1" +"tar@npm:^7.4.3": + version: 7.4.3 + resolution: "tar@npm:7.4.3" dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^5.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10c0/a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.0.1" + mkdirp: "npm:^3.0.1" + yallist: "npm:^5.0.0" + checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d languageName: node linkType: hard @@ -5629,21 +5592,21 @@ __metadata: languageName: node linkType: hard -"unique-filename@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-filename@npm:3.0.0" +"unique-filename@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-filename@npm:4.0.0" dependencies: - unique-slug: "npm:^4.0.0" - checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f + unique-slug: "npm:^5.0.0" + checksum: 10c0/38ae681cceb1408ea0587b6b01e29b00eee3c84baee1e41fd5c16b9ed443b80fba90c40e0ba69627e30855570a34ba8b06702d4a35035d4b5e198bf5a64c9ddc languageName: node linkType: hard -"unique-slug@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-slug@npm:4.0.0" +"unique-slug@npm:^5.0.0": + version: 5.0.0 + resolution: "unique-slug@npm:5.0.0" dependencies: imurmurhash: "npm:^0.1.4" - checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 + checksum: 10c0/d324c5a44887bd7e105ce800fcf7533d43f29c48757ac410afd42975de82cc38ea2035c0483f4de82d186691bf3208ef35c644f73aa2b1b20b8e651be5afd293 languageName: node linkType: hard @@ -5669,11 +5632,11 @@ __metadata: linkType: hard "use-sync-external-store@npm:^1.0.0": - version: 1.2.2 - resolution: "use-sync-external-store@npm:1.2.2" + version: 1.4.0 + resolution: "use-sync-external-store@npm:1.4.0" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/23b1597c10adf15b26ade9e8c318d8cc0abc9ec0ab5fc7ca7338da92e89c2536abd150a5891bf076836c352fdfa104fc7231fb48f806fd9960e0cbe03601abaf + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/ec011a5055962c0f6b509d6e78c0b143f8cd069890ae370528753053c55e3b360d3648e76cfaa854faa7a59eb08d6c5fb1015e60ffde9046d32f5b2a295acea5 languageName: node linkType: hard @@ -5780,14 +5743,14 @@ __metadata: languageName: node linkType: hard -"which@npm:^4.0.0": - version: 4.0.0 - resolution: "which@npm:4.0.0" +"which@npm:^5.0.0": + version: 5.0.0 + resolution: "which@npm:5.0.0" dependencies: isexe: "npm:^3.1.1" bin: node-which: bin/which.js - checksum: 10c0/449fa5c44ed120ccecfe18c433296a4978a7583bf2391c50abce13f76878d2476defde04d0f79db8165bdf432853c1f8389d0485ca6e8ebce3bbcded513d5e6a + checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b languageName: node linkType: hard @@ -5858,6 +5821,13 @@ __metadata: languageName: node linkType: hard +"yallist@npm:^5.0.0": + version: 5.0.0 + resolution: "yallist@npm:5.0.0" + checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 + languageName: node + linkType: hard + "yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" From 088c562f7ad8c0c6f1d2a23de564e4de67a1470f Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Fri, 6 Dec 2024 05:14:27 +0900 Subject: [PATCH 2/4] Enable parcel cache again Signed-off-by: Sora Morimoto --- astexplorer/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astexplorer/package.json b/astexplorer/package.json index 6f84b4210..b33fabd79 100644 --- a/astexplorer/package.json +++ b/astexplorer/package.json @@ -6,8 +6,8 @@ ], "type": "module", "scripts": { - "build": "parcel build --no-cache index.html", - "dev": "parcel watch --no-cache index.html" + "build": "parcel build index.html", + "dev": "parcel watch index.html" }, "dependencies": { "font-awesome": "4.7.0", From a9ae86a67626db25b40f6e582c35c06e3ca00419 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Fri, 6 Dec 2024 05:25:07 +0900 Subject: [PATCH 3/4] Disable dune cache Signed-off-by: Sora Morimoto --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 285edb0ba..3f6537ee7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,6 @@ jobs: uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: 5 - dune-cache: true - name: Set-up Node.js uses: actions/setup-node@v4 From 6a7b951f602b476aa720b80c1486d56be1048b0c Mon Sep 17 00:00:00 2001 From: PixieDust <111846546+PizieDust@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:16:25 +0100 Subject: [PATCH 4/4] Make construct chaining configurable (#1673) * make construct configurable * add changelog * lint * update ocamlformat * make true by default * make construct configurable * add changelog * lint * make true by default * Update markdownDescription Co-authored-by: Ulysse <5031221+voodoos@users.noreply.github.com> * review suggestions --------- Co-authored-by: Sora Morimoto Co-authored-by: Ulysse <5031221+voodoos@users.noreply.github.com> --- CHANGELOG.md | 2 ++ README.md | 31 ++++++++++++++++--------------- package.json | 5 +++++ src/extension_commands.ml | 31 +++++++++++++++++-------------- src/settings.ml | 7 +++++++ src/settings.mli | 2 ++ 6 files changed, 49 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e076a4cc..1959ba272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Unreleased +- Add `ocaml.commands.construct.recursiveCalls` setting to configure construct chaining. (#1673) + ## 1.23.0 - Add `ocaml.jump` to jump to a specific target. (#1654) diff --git a/README.md b/README.md index 09680c1ba..c19ae8988 100644 --- a/README.md +++ b/README.md @@ -211,21 +211,22 @@ to `ocamllsp`. This extension provides options in VSCode's configuration settings. You can find the settings under `File > Preferences > Settings`. -| Name | Description | Default | -| ---------------------------------- | ------------------------------------------------------------------------------------------------------- | ------- | -| `ocaml.sandbox` | Determines where to find the sandbox for a given project | `null` | -| `ocaml.dune.autoDetect` | Controls whether dune tasks should be automatically detected. | `true` | -| `ocaml.trace.server` | Controls the logging output of the language server. Valid settings are `off`, `messages`, or `verbose`. | `off` | -| `ocaml.useOcamlEnv` | Controls whether to use ocaml-env (if available) for opam commands from OCaml for Windows. | `true` | -| `ocaml.terminal.shell.linux` | The path of the shell that the sandbox terminal uses on Linux | `null` | -| `ocaml.terminal.shell.osx` | The path of the shell that the sandbox terminal uses on macOS | `null` | -| `ocaml.terminal.shell.windows` | The path of the shell that the sandbox terminal uses on Windows | `null` | -| `ocaml.terminal.shellArgs.linux` | The command line arguments that the sandbox terminal uses on Linux | `null` | -| `ocaml.terminal.shellArgs.osx` | The command line arguments that the sandbox terminal uses on macOS | `null` | -| `ocaml.terminal.shellArgs.windows` | The command line arguments that the sandbox terminal uses on Window | `null` | -| `ocaml.repl.path` | The path of the REPL that the extension uses | `null` | -| `ocaml.repl.args` | The REPL arguments that the extension uses | `null` | -| `ocaml.repl.useUtop` | Controls whether to use Utop for the REPL if it is installed in the current switch. | `true` | +| Name | Description | Default | +| ----------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------- | +| `ocaml.sandbox` | Determines where to find the sandbox for a given project | `null` | +| `ocaml.dune.autoDetect` | Controls whether dune tasks should be automatically detected. | `true` | +| `ocaml.trace.server` | Controls the logging output of the language server. Valid settings are `off`, `messages`, or `verbose`. | `off` | +| `ocaml.useOcamlEnv` | Controls whether to use ocaml-env (if available) for opam commands from OCaml for Windows. | `true` | +| `ocaml.terminal.shell.linux` | The path of the shell that the sandbox terminal uses on Linux | `null` | +| `ocaml.terminal.shell.osx` | The path of the shell that the sandbox terminal uses on macOS | `null` | +| `ocaml.terminal.shell.windows` | The path of the shell that the sandbox terminal uses on Windows | `null` | +| `ocaml.terminal.shellArgs.linux` | The command line arguments that the sandbox terminal uses on Linux | `null` | +| `ocaml.terminal.shellArgs.osx` | The command line arguments that the sandbox terminal uses on macOS | `null` | +| `ocaml.terminal.shellArgs.windows` | The command line arguments that the sandbox terminal uses on Window | `null` | +| `ocaml.repl.path` | The path of the REPL that the extension uses | `null` | +| `ocaml.repl.args` | The REPL arguments that the extension uses | `null` | +| `ocaml.repl.useUtop` | Controls whether to use Utop for the REPL if it is installed in the current switch. | `true` | +| `ocaml.commands.construct.recursiveCalls` | When enabled, the construct command will execute again on the next hole after a value has been chosen. | `true` | If `ocaml.terminal.shell.*` or `ocaml.terminal.shellArgs.*` is `null`, the configured VSCode shell and shell arguments will be used instead. diff --git a/package.json b/package.json index f813c186b..dcf95840a 100644 --- a/package.json +++ b/package.json @@ -306,6 +306,11 @@ "default": false, "markdownDescription": "Enable/Disable syntax documentation" }, + "ocaml.commands.construct.recursiveCalls": { + "type": "boolean", + "default": true, + "markdownDescription": "When enabled, the construct command will execute again on the next hole after a value has been chosen." + }, "ocaml.dune.autoDetect": { "type": "boolean", "default": true, diff --git a/src/extension_commands.ml b/src/extension_commands.ml index ee342d30e..e8134628c 100644 --- a/src/extension_commands.ml +++ b/src/extension_commands.ml @@ -609,20 +609,23 @@ module Construct = struct match selected_result with | Some (value, range) -> ( let* value_inserted = insert_to_document text_editor range value in - match value_inserted with - | true -> ( - let* new_range = - Holes_commands.closest_hole - (Range.start range) - text_editor - client - `Next - in - match new_range with - | Some range -> - process_construct (Range.end_ range) text_editor client instance - | None -> Promise.return ()) - | false -> Promise.return ()) + match Settings.(get server_constructRecursiveCalls_setting) with + | Some true | None -> ( + match value_inserted with + | true -> ( + let* new_range = + Holes_commands.closest_hole + (Range.start range) + text_editor + client + `Next + in + match new_range with + | Some range -> + process_construct (Range.end_ range) text_editor client instance + | None -> Promise.return ()) + | false -> Promise.return ()) + | Some false -> Promise.return ()) | None -> Promise.return () let _construct = diff --git a/src/settings.ml b/src/settings.ml index 887970f9a..6064cd258 100644 --- a/src/settings.ml +++ b/src/settings.ml @@ -141,3 +141,10 @@ let server_syntaxDocumentation_setting = ~key:"ocaml.server.syntaxDocumentation" ~of_json:Jsonoo.Decode.bool ~to_json:Jsonoo.Encode.bool + +let server_constructRecursiveCalls_setting = + create_setting + ~scope:ConfigurationTarget.Workspace + ~key:"ocaml.commands.construct.recursiveCalls" + ~of_json:Jsonoo.Decode.bool + ~to_json:Jsonoo.Encode.bool diff --git a/src/settings.mli b/src/settings.mli index 08df2692a..5442f85c4 100644 --- a/src/settings.mli +++ b/src/settings.mli @@ -45,3 +45,5 @@ val server_extendedHover_setting : bool setting val server_duneDiagnostics_setting : bool setting val server_syntaxDocumentation_setting : bool setting + +val server_constructRecursiveCalls_setting : bool setting