diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index e0444a50f..4e4b7a583 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -21,7 +21,7 @@
{
"label": "Calva Watch CLJS",
"type": "npm",
- "script": "watch",
+ "script": "watch-cljs",
"isBackground": true,
"group": {
"kind": "build",
@@ -48,7 +48,7 @@
}
},
{
- "label": "Calva Test Watch",
+ "label": "Calva Watch Test TS",
"type": "npm",
"script": "unit-test-watch",
"isBackground": true,
@@ -81,7 +81,7 @@
}
},
{
- "label": "Calva Lint Watch",
+ "label": "Calva Watch Lint",
"type": "npm",
"script": "eslint-watch",
"isBackground": true,
@@ -96,7 +96,7 @@
}
},
{
- "label": "Calva Prettier Format Watch",
+ "label": "Calva Watch TS Format",
"type": "npm",
"script": "prettier-format-watch",
"isBackground": true,
@@ -109,17 +109,17 @@
}
},
{
- "label": "Calva Watch",
+ "label": "Calva Watchers",
"group": {
"kind": "build",
"isDefault": false
},
"dependsOn": [
- "Calva Prettier Format Watch",
+ "Calva Watch TS Format",
"Calva Watch TS",
"Calva Watch CLJS",
- "Calva Test Watch",
- "Calva Lint Watch"
+ "Calva Watch Test TS",
+ "Calva Watch Lint"
]
},
{
@@ -129,7 +129,7 @@
"isDefault": true
},
"dependsOrder": "sequence",
- "dependsOn": ["Calva Compile", "Calva Watch"]
+ "dependsOn": ["Calva Compile", "Calva Watchers"]
}
]
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 40d6082d9..52787b539 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,8 +3,13 @@
Changes to Calva.
## [Unreleased]
+
+## [2.0.263] - 2022-04-06
- [Improve kondo configuration documentation](https://github.com/BetterThanTomorrow/calva/issues/1282)
- [Require VS Code 1.66+ (and update project node version to 16+)](https://github.com/BetterThanTomorrow/calva/issues/1638#issuecomment-1086726236)
+- Maintenance: [Upgrade TS + some ts eslint plugins + fix any necessary changes thereof](https://github.com/BetterThanTomorrow/calva/issues/1639)
+- Fix: [Command not working: sync the Output/REPL window namespace with the current file](https://github.com/BetterThanTomorrow/calva/issues/1503)
+
## [2.0.262] - 2022-04-02
- Tech debt mortgage: [Cleanup/removal of EditableDocument.selectionLeft/Right APIs](https://github.com/BetterThanTomorrow/calva/issues/1607)]
diff --git a/docs/site/formatting.md b/docs/site/formatting.md
index 0a3b47c39..405c9d0d4 100644
--- a/docs/site/formatting.md
+++ b/docs/site/formatting.md
@@ -37,8 +37,7 @@ Not a fan of some default setting? The formatter is quite configurable.
You configure Calva's formatting using [cljfmt's configuration EDN](https://github.com/weavejester/cljfmt#configuration). This means that you can adjust the above mentioned defaults, including the indenting.
-This configuration can either be provided via a file or via clojure-lsp (see [Clojure LSP Settings]
-(https://clojure-lsp.io/settings/)).
+This configuration can either be provided via a file or via clojure-lsp (see [Clojure LSP Settings](https://clojure-lsp.io/settings/)).
??? Note "Only use the clojure-lsp config option if you need it"
The option to read formatting config from clojure-lsp is there to let teams where some members use clojure-lsp for formatting, share the config. To provide the settings via clojure-lsp, set `calva.fmt.configPath` to `CLOJURE-LSP` (case sensitive). However, there are limitations:
diff --git a/docs/site/parinfer.md b/docs/site/parinfer.md
index 49cb30cf2..54fa2769a 100644
--- a/docs/site/parinfer.md
+++ b/docs/site/parinfer.md
@@ -1,20 +1,57 @@
---
title: Parinfer
-description: Learn how to leverage Calva Parinfer Mode for structural editing
+description: Use Calva v2.0.227 to test the experimental and reverted Parinfer Mode for structural editing
---
-# Calva Parinfer Mode
+# Calva Parinfer Mode is Reverted
-!!! Note "Reverted in Calva v2.0.228"
- The changes in v2.0.227 seemed to cause problems for some users. Unclear yet if and why. But to not risk causing problems for more users these changes where reverted and Calva v2.0.228 does not contain them. **Please consider using v2.0.227 and help find what the problems are about!**
+!!! Failure "Reverted in Calva v2.0.228"
+ The changes in v2.0.227 seemed to cause problems for some users. Unclear yet if and why. But to not risk causing problems for more users these changes where reverted and Calva v2.0.228 does not contain them. **Please consider using v2.0.227 and help find what the problems are about!** Please note: Even in v2.0.227 this feature is currently disabled by default.
[Parinfer](https://shaunlebron.github.io/parinfer/) is a system for editing the structure of LISP text without explicit commands. The structure can be regarded as already being expressed through indentation. With Parinfer you can use your intuition about the structure _inferred_ from the indentation to perform surprisingly many structural edits.
-!!! Note "Experimental"
- This feature is currently disabled by default and should be considered experimental. There are known [quirks](#quirks). Especially beginners should take note. Parinfer is not as beginner friendly as it might seem, and with the quirks it might be extra ”dangerous”.
+## Quirks
+
+There are some known quirks, of varying severity, with this feature. Some of them will need to be fixed before we move this feature out of **Experimental** status.
+
+For the most times you can always *Undo* to get back to where the document was fine. You just need to pay some attention and be aware when undo is needed.
+
+### No multi-cursor support
+
+The bracket inference will remove all cursors but the first one. So for instance if you edit with multiple cursors and it causes brackets to move, you'll end up with just one cursor and the subsequent edits will not be what you intended. This is particularly important to note when you have cursors that are not in the viewport. In such cases it might be better to turn Parinfer off while you do the edits, fix formatting and such manually and then switch Parinfer on again.
+
+### Wrong inferences
+
+For yet unknown reasons an edit such as the following does the wrong thing (the cursor indicated by the vertical bar):
+
+```clojure
+(foo| (bar)
+ (baz))
+```
+
+backspace =>
+
+```clojure
+(fo| (bar
+ (baz)))
+```
+
+That is `(baz)` is slurped. When what should happen is:
+
+```clojure
+(fo| (bar)
+ (baz))
+```
+
+### Lag causing errors when fast typing
+
+The way that Calva Parinfer works is that for any edit of the document it first reformats the code around the cursor, then infer brackets. Currently these two steps are not atomic to VS Code, so if you type fast bracket inference might happen on the yet unformatted code, and thus not be correct. You might also see the cursor end up at the wrong position at times.
## Infer Parens
+!!! Mote "This is no longer available in Calva"
+ See above about how to try this build anyway, warts and all.
+
When you enable Calva's Parinfer it is all about infering brackets from indentation. There are no further Parinfer modes. Calva's auto-formatter will take care of keeping the code correctly indented.
Enable it with from this setting: `calva.fmt.experimental.inferParensAsYouType` or from the status bar item.
@@ -74,43 +111,6 @@ In Calva, Parinfer and [Paredit](paredit.md) are designed to coexist and both be
If you want to have Parinfer you are probably best served by Calva's built-in version. It is designed, and will continue to be improved to function well together with Calva's other structural editing and formatting features. _It will also probably conflict with the Parinfer Extension._
-## Quirks
-
-There are some known quirks, of varying severity, with this feature. Some of them will need to be fixed before we move this feature out of **Experimental** status.
-
-For the most times you can always *Undo* to get back to where the document was fine. You just need to pay some attention and be aware when undo is needed.
-
-### No multi-cursor support
-
-The bracket inference will remove all cursors but the first one. So for instance if you edit with multiple cursors and it causes brackets to move, you'll end up with just one cursor and the subsequent edits will not be what you intended. This is particularly important to note when you have cursors that are not in the viewport. In such cases it might be better to turn Parinfer off while you do the edits, fix formatting and such manually and then switch Parinfer on again.
-
-### Wrong inferences
-
-For yet unknown reasons an edit such as the following does the wrong thing (the cursor indicated by the vertical bar):
-
-```clojure
-(foo| (bar)
- (baz))
-```
-
-backspace =>
-
-```clojure
-(fo| (bar
- (baz)))
-```
-
-That is `(baz)` is slurped. When what should happen is:
-
-```clojure
-(fo| (bar)
- (baz))
-```
-
-### Lag causing errors when fast typing
-
-The way that Calva Parinfer works is that for any edit of the document it first reformats the code around the cursor, then infer brackets. Currently these two steps are not atomic to VS Code, so if you type fast bracket inference might happen on the yet unformatted code, and thus not be correct. You might also see the cursor end up at the wrong position at times.
-
## See also
* [Paredit](paredit.md)
diff --git a/package-lock.json b/package-lock.json
index a5ff05e11..7cc0038ff 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "calva",
- "version": "2.0.263",
+ "version": "2.0.264",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "calva",
- "version": "2.0.263",
+ "version": "2.0.264",
"license": "MIT",
"dependencies": {
"@types/escape-html": "0.0.20",
@@ -43,8 +43,8 @@
"@types/lodash": "^4.14.167",
"@types/mocha": "^9.1.0",
"@types/vscode": "^1.45.0",
- "@typescript-eslint/eslint-plugin": "^5.11.0",
- "@typescript-eslint/parser": "^5.11.0",
+ "@typescript-eslint/eslint-plugin": "^5.17.0",
+ "@typescript-eslint/parser": "^5.17.0",
"chai": "^4.2.0",
"concurrently": "^6.3.0",
"cson-parser": "^4.0.3",
@@ -71,7 +71,7 @@
"tar": "^4.4.18",
"ts-loader": "^8.0.18",
"ts-node": "^10.3.0",
- "typescript": "^3.9.10",
+ "typescript": "^4.6.3",
"url-loader": "^4.1.1",
"vsce": "^2.6.7",
"vscode-test": "^1.3.0",
@@ -1560,14 +1560,14 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz",
- "integrity": "sha512-HJh33bgzXe6jGRocOj4FmefD7hRY4itgjzOrSs3JPrTNXsX7j5+nQPciAUj/1nZtwo2kAc3C75jZO+T23gzSGw==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz",
+ "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.11.0",
- "@typescript-eslint/type-utils": "5.11.0",
- "@typescript-eslint/utils": "5.11.0",
+ "@typescript-eslint/scope-manager": "5.17.0",
+ "@typescript-eslint/type-utils": "5.17.0",
+ "@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.1.8",
@@ -1593,14 +1593,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.11.0.tgz",
- "integrity": "sha512-x0DCjetHZYBRovJdr3U0zG9OOdNXUaFLJ82ehr1AlkArljJuwEsgnud+Q7umlGDFLFrs8tU8ybQDFocp/eX8mQ==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.17.0.tgz",
+ "integrity": "sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.11.0",
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/typescript-estree": "5.11.0",
+ "@typescript-eslint/scope-manager": "5.17.0",
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/typescript-estree": "5.17.0",
"debug": "^4.3.2"
},
"engines": {
@@ -1620,13 +1620,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz",
- "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz",
+ "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/visitor-keys": "5.11.0"
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/visitor-keys": "5.17.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1637,12 +1637,12 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.11.0.tgz",
- "integrity": "sha512-wDqdsYO6ofLaD4DsGZ0jGwxp4HrzD2YKulpEZXmgN3xo4BHJwf7kq49JTRpV0Gx6bxkSUmc9s0EIK1xPbFFpIA==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz",
+ "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/utils": "5.11.0",
+ "@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"tsutils": "^3.21.0"
},
@@ -1663,9 +1663,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz",
- "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz",
+ "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1676,13 +1676,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz",
- "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz",
+ "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/visitor-keys": "5.11.0",
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/visitor-keys": "5.17.0",
"debug": "^4.3.2",
"globby": "^11.0.4",
"is-glob": "^4.0.3",
@@ -1703,15 +1703,15 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz",
- "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz",
+ "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.9",
- "@typescript-eslint/scope-manager": "5.11.0",
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/typescript-estree": "5.11.0",
+ "@typescript-eslint/scope-manager": "5.17.0",
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/typescript-estree": "5.17.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
},
@@ -1749,12 +1749,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz",
- "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz",
+ "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.11.0",
+ "@typescript-eslint/types": "5.17.0",
"eslint-visitor-keys": "^3.0.0"
},
"engines": {
@@ -10680,9 +10680,9 @@
}
},
"node_modules/typescript": {
- "version": "3.9.10",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
- "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
+ "version": "4.6.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
+ "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -13005,14 +13005,14 @@
}
},
"@typescript-eslint/eslint-plugin": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz",
- "integrity": "sha512-HJh33bgzXe6jGRocOj4FmefD7hRY4itgjzOrSs3JPrTNXsX7j5+nQPciAUj/1nZtwo2kAc3C75jZO+T23gzSGw==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz",
+ "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "5.11.0",
- "@typescript-eslint/type-utils": "5.11.0",
- "@typescript-eslint/utils": "5.11.0",
+ "@typescript-eslint/scope-manager": "5.17.0",
+ "@typescript-eslint/type-utils": "5.17.0",
+ "@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.1.8",
@@ -13022,52 +13022,52 @@
}
},
"@typescript-eslint/parser": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.11.0.tgz",
- "integrity": "sha512-x0DCjetHZYBRovJdr3U0zG9OOdNXUaFLJ82ehr1AlkArljJuwEsgnud+Q7umlGDFLFrs8tU8ybQDFocp/eX8mQ==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.17.0.tgz",
+ "integrity": "sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "5.11.0",
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/typescript-estree": "5.11.0",
+ "@typescript-eslint/scope-manager": "5.17.0",
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/typescript-estree": "5.17.0",
"debug": "^4.3.2"
}
},
"@typescript-eslint/scope-manager": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz",
- "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz",
+ "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/visitor-keys": "5.11.0"
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/visitor-keys": "5.17.0"
}
},
"@typescript-eslint/type-utils": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.11.0.tgz",
- "integrity": "sha512-wDqdsYO6ofLaD4DsGZ0jGwxp4HrzD2YKulpEZXmgN3xo4BHJwf7kq49JTRpV0Gx6bxkSUmc9s0EIK1xPbFFpIA==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz",
+ "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==",
"dev": true,
"requires": {
- "@typescript-eslint/utils": "5.11.0",
+ "@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/types": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz",
- "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz",
+ "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz",
- "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz",
+ "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/visitor-keys": "5.11.0",
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/visitor-keys": "5.17.0",
"debug": "^4.3.2",
"globby": "^11.0.4",
"is-glob": "^4.0.3",
@@ -13076,15 +13076,15 @@
}
},
"@typescript-eslint/utils": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz",
- "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz",
+ "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.9",
- "@typescript-eslint/scope-manager": "5.11.0",
- "@typescript-eslint/types": "5.11.0",
- "@typescript-eslint/typescript-estree": "5.11.0",
+ "@typescript-eslint/scope-manager": "5.17.0",
+ "@typescript-eslint/types": "5.17.0",
+ "@typescript-eslint/typescript-estree": "5.17.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
},
@@ -13108,12 +13108,12 @@
}
},
"@typescript-eslint/visitor-keys": {
- "version": "5.11.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz",
- "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==",
+ "version": "5.17.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz",
+ "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.11.0",
+ "@typescript-eslint/types": "5.17.0",
"eslint-visitor-keys": "^3.0.0"
}
},
@@ -20040,9 +20040,9 @@
}
},
"typescript": {
- "version": "3.9.10",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
- "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
+ "version": "4.6.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
+ "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
"dev": true
},
"uc.micro": {
diff --git a/package.json b/package.json
index 4105f1eaf..858190b4a 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.263",
+ "version": "2.0.264",
"publisher": "betterthantomorrow",
"author": {
"name": "Better Than Tomorrow",
@@ -2712,10 +2712,10 @@
"compile": "npm run compile-cljs && npm run compile-ts",
"watch-ts": "npx tsc --watch --project ./tsconfig.json",
"watch-cljs": "npx shadow-cljs watch :calva-lib :test",
- "watch": "npm run watch-cljs",
- "watch-with-strict-nulls": "npx tsc --watch --project ./tsconfig.json --strictNullChecks",
+ "watch-ts-with-strict-nulls": "npx tsc --watch --project ./tsconfig.json --strictNullChecks",
"release-cljs": "npx shadow-cljs release :calva-lib :test",
"release": "npm i && npm run clean && npm run update-grammar && npm run release-cljs && webpack --mode production",
+ "prerelease": "npm run precompile && npm run release-cljs",
"compile-test": "tsc -p ./",
"postrelease": "",
"vscode:prepublish": "npm run release",
@@ -2729,6 +2729,7 @@
"prettier-check": "npx prettier --check './**/*.{ts,js,json}'",
"prettier-check-watch": "npx onchange './**/*.{ts,js,json}' -- prettier --check {{changed}}",
"prettier-format-watch": "npx onchange './**/*.{ts,js,json}' -- prettier --write {{changed}}",
+ "preprettier-format-watch": "npm run prettier-format",
"eslint": "npx eslint . --ext .js,.jsx,.ts,.tsx",
"eslint-watch": "npx esw . --ext .js,.jsx,.ts,.tsx --watch"
},
@@ -2767,8 +2768,8 @@
"@types/lodash": "^4.14.167",
"@types/mocha": "^9.1.0",
"@types/vscode": "^1.45.0",
- "@typescript-eslint/eslint-plugin": "^5.11.0",
- "@typescript-eslint/parser": "^5.11.0",
+ "@typescript-eslint/eslint-plugin": "^5.17.0",
+ "@typescript-eslint/parser": "^5.17.0",
"chai": "^4.2.0",
"concurrently": "^6.3.0",
"cson-parser": "^4.0.3",
@@ -2795,7 +2796,7 @@
"tar": "^4.4.18",
"ts-loader": "^8.0.18",
"ts-node": "^10.3.0",
- "typescript": "^3.9.10",
+ "typescript": "^4.6.3",
"url-loader": "^4.1.1",
"vsce": "^2.6.7",
"vscode-test": "^1.3.0",
diff --git a/src/edit.ts b/src/edit.ts
index 76277baaa..98b407626 100644
--- a/src/edit.ts
+++ b/src/edit.ts
@@ -19,7 +19,7 @@ export function continueCommentCommand() {
}
const commentOffset = cursor.rowCol[1];
const commentText = cursor.getToken().raw;
- const [_1, startText, bullet, num] = commentText.match(/^([;\s]+)([*-] +|(\d+)\. +)?/);
+ const [_1, startText, bullet, num] = commentText.match(/^([;\s]+)([*-] +|(\d+)\. +)?/) ?? [];
const newNum = num ? parseInt(num) + 1 : undefined;
const bulletText = newNum ? bullet.replace(/\d+/, '' + newNum) : bullet;
const pad = ' '.repeat(commentOffset);
diff --git a/src/evaluate.ts b/src/evaluate.ts
index efc3c741a..40b4eaf3e 100644
--- a/src/evaluate.ts
+++ b/src/evaluate.ts
@@ -93,7 +93,7 @@ async function evaluateCode(
const err: string[] = [];
if (outputWindow.getNs() !== ns) {
- await session.eval("(in-ns '" + ns + ')', session.client.ns).value;
+ await session.eval(`(in-ns '${ns}) (clojure.core/refer-clojure)`, session.client.ns).value;
}
const context: NReplEvaluation = session.eval(code, ns, {
@@ -417,7 +417,7 @@ async function loadFile(
outputWindow.append('; Evaluating file: ' + fileName);
- await session.eval("(in-ns '" + ns + ')', session.client.ns).value;
+ await session.eval(`(in-ns '${ns}) (clojure.core/refer-clojure)`, session.client.ns).value;
const res = session.loadFile(fileContents, {
fileName,
@@ -474,7 +474,7 @@ async function requireREPLUtilitiesCommand() {
if (session) {
try {
await namespace.createNamespaceFromDocumentIfNotExists(util.tryToGetDocument({}));
- await session.eval("(in-ns '" + ns + ')', session.client.ns).value;
+ await session.eval(`(in-ns '${ns}) (clojure.core/refer-clojure)`, session.client.ns).value;
await session.eval(form, ns).value;
chan.appendLine(`REPL utilities are now available in namespace ${ns}.`);
} catch (e) {
@@ -548,7 +548,7 @@ export async function evaluateInOutputWindow(
const session = replSession.getSession(sessionType);
replSession.updateReplSessionType();
if (outputWindow.getNs() !== ns) {
- await session.eval(`(in-ns '${ns})`, session.client.ns).value;
+ await session.eval(`(in-ns '${ns}) (clojure.core/refer-clojure)`, session.client.ns).value;
outputWindow.setSession(session, ns);
if (options.evaluationSendCodeToOutputWindow !== false) {
outputWindow.appendPrompt();
diff --git a/src/results-output/results-doc.ts b/src/results-output/results-doc.ts
index f8fd08571..4e2bf8c7d 100644
--- a/src/results-output/results-doc.ts
+++ b/src/results-output/results-doc.ts
@@ -229,10 +229,11 @@ export async function setNamespaceFromCurrentFile() {
const session = replSession.getSession();
const ns = namespace.getNamespace(util.tryToGetDocument({}));
if (getNs() !== ns && util.isDefined(ns)) {
- await session.eval("(in-ns '" + ns + ')', session.client.ns).value;
+ await session.eval(`(in-ns '${ns}) (clojure.core/refer-clojure)`, session.client.ns).value;
}
setSession(session, ns);
replSession.updateReplSessionType();
+ appendPrompt();
}
async function appendFormGrabbingSessionAndNS(topLevel: boolean) {
@@ -250,7 +251,7 @@ async function appendFormGrabbingSessionAndNS(topLevel: boolean) {
}
if (code != '') {
if (getNs() !== ns) {
- await session.eval("(in-ns '" + ns + ')', session.client.ns).value;
+ await session.eval(`(in-ns '${ns}) (clojure.core/refer-clojure)`, session.client.ns).value;
}
setSession(session, ns);
append(code, (_) => revealResultsDoc(false));
diff --git a/src/results-output/util.ts b/src/results-output/util.ts
index 822ed1894..2e08c683e 100644
--- a/src/results-output/util.ts
+++ b/src/results-output/util.ts
@@ -1,7 +1,7 @@
import { takeWhile } from 'lodash';
import type { ResultsBuffer } from './results-doc';
-function addToHistory(history: string[], content: string): string[] {
+function addToHistory(history: string[], content?: string): string[] {
if (content) {
const entry = content.trim();
if (entry !== '') {
diff --git a/test-data/.vscode/settings.json b/test-data/.vscode/settings.json
index 913aa2ffb..48eeb143c 100644
--- a/test-data/.vscode/settings.json
+++ b/test-data/.vscode/settings.json
@@ -14,5 +14,12 @@
"name": "Show doc string",
"snippet": "(clojure.string/replace (with-out-str (clojure.repl/doc $hover-text)) \"\n\" \"\n\n\")"
}
- ]
+ ],
+ "workbench.colorCustomizations": {
+ "sash.hoverBorder": "#DB9550",
+ "titleBar.activeBackground": "#90B4FE",
+ "titleBar.activeForeground": "#131722",
+ "titleBar.inactiveBackground": "#90B4FEd5",
+ "titleBar.inactiveForeground": "#13172299"
+ }
}
diff --git a/tsconfig.json b/tsconfig.json
index c97595b94..a07a64cca 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -18,7 +18,7 @@
"module": "commonjs",
"target": "es6",
"outDir": "out",
- "lib": ["es2020", "dom", "ESNext.String"],
+ "lib": ["es2020", "dom"],
"sourceMap": true,
"rootDir": "src"
},