From f32a8f225d3a09b9cb9eb4c9861cafc4ebe41c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Tue, 1 Oct 2024 08:19:33 +0000 Subject: [PATCH 1/7] Bring on version 2.0.480! --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5755a1ee1..3e6f8b4f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "calva", - "version": "2.0.479", + "version": "2.0.480", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "calva", - "version": "2.0.479", + "version": "2.0.480", "license": "MIT", "dependencies": { "@vscode/debugadapter": "^1.64.0", diff --git a/package.json b/package.json index 3c32da214..ec7c5185c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Calva: Clojure & ClojureScript Interactive Programming", "description": "Integrated REPL, formatter, Paredit, and more. Powered by cider-nrepl and clojure-lsp.", "icon": "assets/calva.png", - "version": "2.0.479", + "version": "2.0.480", "publisher": "betterthantomorrow", "author": { "name": "Better Than Tomorrow", From 0af4d13da9baf961afc0ace2fcc2da562d63b444 Mon Sep 17 00:00:00 2001 From: Brandon Ringe <12722744+bpringe@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:43:03 -0700 Subject: [PATCH 2/7] Stop setting deprecated `keep-require-at-start?` setting in clojure-lsp initialization options --- src/lsp/client/client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lsp/client/client.ts b/src/lsp/client/client.ts index a13ac37b8..33b7a2fa9 100644 --- a/src/lsp/client/client.ts +++ b/src/lsp/client/client.ts @@ -150,7 +150,6 @@ export const createClient = (params: CreateClientParams): defs.LspClient => { 'auto-add-ns-to-new-files?': true, 'document-formatting?': false, 'document-range-formatting?': false, - 'keep-require-at-start?': true, }, middleware: { didOpen: (document, next) => { From 54cd13d5778f68203f0869e7c2240950d8517112 Mon Sep 17 00:00:00 2001 From: Brandon Ringe <12722744+bpringe@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:52:43 -0700 Subject: [PATCH 3/7] Fix #2648 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01ca29b94..b0c3d3601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Changes to Calva. ## [Unreleased] +- Fix: [ns inner blocks are kept on the same line by default when using the clean ns command](https://github.com/BetterThanTomorrow/calva/issues/2648) + ## [2.0.479] - 2024-10-01 - [Autostart REPL in created projects, also when created in the current folder](https://github.com/BetterThanTomorrow/calva/issues/2644) From 8f446dbc17ad419c044b8aaf031587a7d2a86a7e Mon Sep 17 00:00:00 2001 From: EvenMoreIrrelevance <156138450+EvenMoreIrrelevance@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:27:14 +0200 Subject: [PATCH 4/7] fix issue #2650 --- CHANGELOG.md | 1 + src/nrepl/jack-in.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0c3d3601..e5daa56f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Changes to Calva. ## [Unreleased] +- Fix: [Only the first environment variable is resolved in jackInEnvironment](https://github.com/BetterThanTomorrow/calva/issues/2650) - Fix: [ns inner blocks are kept on the same line by default when using the clean ns command](https://github.com/BetterThanTomorrow/calva/issues/2648) diff --git a/src/nrepl/jack-in.ts b/src/nrepl/jack-in.ts index e2ec9c9dc..5d68a2b09 100644 --- a/src/nrepl/jack-in.ts +++ b/src/nrepl/jack-in.ts @@ -28,7 +28,7 @@ import * as inspector from '../providers/inspector'; function resolveEnvVariables(entry: any): any { if (typeof entry === 'string') { - const s = entry.replace(/\$\{env:(\w+)\}/, (_, v) => (process.env[v] ? process.env[v] : '')); + const s = entry.replace(/\$\{env:(\w+)\}/g, (_, v) => (process.env[v] ? process.env[v] : '')); return s; } else { return entry; From 5e4d6fc75037b047fe48c3020feab388bfa0589c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Mon, 21 Oct 2024 20:26:06 +0200 Subject: [PATCH 5/7] Update bundled drams --- bundled/drams-menu/drams-dev.edn | 6 +++++- bundled/drams-menu/drams-published.edn | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bundled/drams-menu/drams-dev.edn b/bundled/drams-menu/drams-dev.edn index 92201b4c0..22aa35fa9 100644 --- a/bundled/drams-menu/drams-dev.edn +++ b/bundled/drams-menu/drams-dev.edn @@ -11,4 +11,8 @@ {:title "Create a mini Clojure project", :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/dev/drams/v2/mini", :extraDetail "Starts a REPL, requires Java", - :description "A quick way to Fire up a Clojure REPL"}] \ No newline at end of file + :description "A quick way to Fire up a Clojure REPL"} + {:title "Create a mini shadow-cljs Fullstack project", + :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/dev/drams/v2/mini_shadow_fullstack", + :extraDetail "Starts a REPL, requires Java", + :description "From Thomas Helller's Fullstack Workflow with shadow-cljs"}] \ No newline at end of file diff --git a/bundled/drams-menu/drams-published.edn b/bundled/drams-menu/drams-published.edn index 0eded7f7f..717b63499 100644 --- a/bundled/drams-menu/drams-published.edn +++ b/bundled/drams-menu/drams-published.edn @@ -11,4 +11,8 @@ {:title "Create a mini Clojure project", :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/published/drams/v2/mini", :extraDetail "Starts a REPL, requires Java", - :description "A quick way to Fire up a Clojure REPL"}] \ No newline at end of file + :description "A quick way to Fire up a Clojure REPL"} + {:title "Create a mini shadow-cljs Fullstack project", + :src "https://raw.githubusercontent.com/BetterThanTomorrow/dram/published/drams/v2/mini_shadow_fullstack", + :extraDetail "Starts a REPL, requires Java", + :description "From Thomas Helller's Fullstack Workflow with shadow-cljs"}] \ No newline at end of file From 2c78d7e8504b3c26b501e3aa83367e231068a1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Mon, 21 Oct 2024 20:28:58 +0200 Subject: [PATCH 6/7] Only use editorNS if repl type matches * Fixes #2653 --- CHANGELOG.md | 2 +- src/custom-snippets.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5daa56f9..97caf0a9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,8 @@ Changes to Calva. ## [Unreleased] -- Fix: [Only the first environment variable is resolved in jackInEnvironment](https://github.com/BetterThanTomorrow/calva/issues/2650) +- Fix: [Custom command snippets use the wrong ns when repl sessions types do not match](https://github.com/BetterThanTomorrow/calva/issues/2653) - Fix: [ns inner blocks are kept on the same line by default when using the clean ns command](https://github.com/BetterThanTomorrow/calva/issues/2648) ## [2.0.479] - 2024-10-01 diff --git a/src/custom-snippets.ts b/src/custom-snippets.ts index e7b6308bf..2e7498859 100644 --- a/src/custom-snippets.ts +++ b/src/custom-snippets.ts @@ -51,8 +51,9 @@ async function evaluateCodeOrKeyOrSnippet(codeOrKeyOrSnippet?: string | SnippetD ? codeOrKeyOrSnippet : await getSnippetDefinition(codeOrKeyOrSnippet as string, editorNS, editorRepl); - snippetDefinition.ns = snippetDefinition.ns ?? editorNS; snippetDefinition.repl = snippetDefinition.repl ?? editorRepl; + snippetDefinition.ns = + snippetDefinition.ns ?? (editorRepl === snippetDefinition.repl ? editorNS : undefined); snippetDefinition.evaluationSendCodeToOutputWindow = snippetDefinition.evaluationSendCodeToOutputWindow ?? true; From 513a3dff29e41445ee93da2185a5a78ffe3b1579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Str=C3=B6mberg?= Date: Mon, 21 Oct 2024 20:50:55 +0200 Subject: [PATCH 7/7] Add changelog section for v2.0.480 [skip ci] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97caf0a9b..63a896bbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Changes to Calva. ## [Unreleased] +## [2.0.480] - 2024-10-21 + - Fix: [Custom command snippets use the wrong ns when repl sessions types do not match](https://github.com/BetterThanTomorrow/calva/issues/2653) - Fix: [ns inner blocks are kept on the same line by default when using the clean ns command](https://github.com/BetterThanTomorrow/calva/issues/2648)