AmazonScience/SWE-PolyBench_500 huggingface dataset:
Repository: sveltejs/svelte (JavaScript)
Task type: Refactoring

Issue:
Proposal: `dev: true` only affects runtime warnings and errors
Right now, compiling with `dev: true` causes the compiler to emit a bunch of code to display additional runtime warnings and errors, to assist with debugging - and it also enables a compile-time warning for empty blocks. As far as I can tell, the empty blocks warning is the only compiler-time thing it affects.

This seems weird, and I think it would be nicer if `dev: true` _only_ affected runtime things. This would mean that the empty block compile-time warning would always be emitted - so this issues can go along with #2040, which makes it simpler to suppress specific warnings at compile time.


Discussion:

Solution patch:
diff --git a/src/compile/nodes/shared/Node.ts b/src/compile/nodes/shared/Node.ts
--- a/src/compile/nodes/shared/Node.ts
+++ b/src/compile/nodes/shared/Node.ts
@@ -49,7 +49,6 @@ export default class Node {
 	}
 
 	warnIfEmptyBlock() {
-		if (!this.component.compileOptions.dev) return;
 		if (!/Block$/.test(this.type) || !this.children) return;
 		if (this.children.length > 1) return;
 


Test patch:
diff --git a/test/validator/samples/empty-block-dev/_config.js b/test/validator/samples/empty-block-dev/_config.js
deleted file mode 100644
--- a/test/validator/samples/empty-block-dev/_config.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
-	dev: true
-};
\ No newline at end of file
diff --git a/test/validator/samples/empty-block-prod/input.svelte b/test/validator/samples/empty-block-prod/input.svelte
deleted file mode 100644
--- a/test/validator/samples/empty-block-prod/input.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-{#each things as thing}
-
-{/each}
-
-{#each things as thing}{/each}
\ No newline at end of file
diff --git a/test/validator/samples/empty-block-prod/warnings.json b/test/validator/samples/empty-block-prod/warnings.json
deleted file mode 100644
--- a/test/validator/samples/empty-block-prod/warnings.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/test/validator/samples/empty-block-dev/input.svelte b/test/validator/samples/empty-block/input.svelte
similarity index 100%
rename from test/validator/samples/empty-block-dev/input.svelte
rename to test/validator/samples/empty-block/input.svelte
diff --git a/test/validator/samples/empty-block-dev/warnings.json b/test/validator/samples/empty-block/warnings.json
similarity index 100%
rename from test/validator/samples/empty-block-dev/warnings.json
rename to test/validator/samples/empty-block/warnings.json
Repository: sveltejs/svelte (JavaScript)
Task type: Bug Fix

Issue:
:not(...) styles are broken
[REPL](https://svelte.technology/repl?version=2.13.1&gist=c80e2cda5f07897ad9eaada7df570cc0). The encapsulator should treat `:not(selector)` as `*:not(selector)`, but it doesn't.


Discussion:
I don't think it is a svelte bug. 
This is the normal behaviour in CSS. 
See this codepen : https://codepen.io/thollander/pen/JzJQKO?editors=1100

The color is inherited by default. 
https://www.w3schools.com/cssref/pr_text_color.asp
So it takes the color of the body property which validates the rule `:not(p)`
However, in the example, you can see border hasn't the same behaviour.


Updated REPL that shows the bug better: https://svelte.dev/repl/3c70b1effcf4442a8280b1c5db8c6f10?version=3.6.2

`:not(xxx)` should be converted to `.svelte-xyz123:not(xxx)`

Solution patch:
diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts
--- a/src/compiler/compile/css/Selector.ts
+++ b/src/compiler/compile/css/Selector.ts
@@ -61,7 +61,10 @@ export default class Selector {
 			let i = block.selectors.length;
 			while (i--) {
 				const selector = block.selectors[i];
-				if (selector.type === 'PseudoElementSelector' || selector.type === 'PseudoClassSelector') continue;
+				if (selector.type === 'PseudoElementSelector' || selector.type === 'PseudoClassSelector') {
+					if (i === 0) code.prependRight(selector.start, attr);
+					continue;
+				}
 
 				if (selector.type === 'TypeSelector' && selector.name === '*') {
 					code.overwrite(selector.start, selector.end, attr);


Test patch:
diff --git a/test/css/samples/not-selector/expected.css b/test/css/samples/not-selector/expected.css
new file mode 100644
--- /dev/null
+++ b/test/css/samples/not-selector/expected.css
@@ -0,0 +1 @@
+.svelte-xyz:not(.foo){color:red}
\ No newline at end of file
diff --git a/test/css/samples/not-selector/input.svelte b/test/css/samples/not-selector/input.svelte
new file mode 100644
--- /dev/null
+++ b/test/css/samples/not-selector/input.svelte
@@ -0,0 +1,8 @@
+<p class="foo">foo</p>
+<p class="bar">bar</p>
+
+<style>
+	:not(.foo) {
+		color: red;
+	}
+</style>
\ No newline at end of file
Repository: prettier/prettier (JavaScript)
Task type: Feature

Issue:
Support relative paths for plugin and pluginSearchDir in config files
Context: https://github.com/prettier/prettier/pull/4192#discussion_r186809767


Discussion:

Solution patch:
diff --git a/src/config/resolve-config.js b/src/config/resolve-config.js
index 229caf3d5fdd..c8f0f43433ab 100644
--- a/src/config/resolve-config.js
+++ b/src/config/resolve-config.js
@@ -48,6 +48,17 @@ function _resolveConfig(filePath, opts, sync) {
       mergeOverrides(Object.assign({}, result), filePath)
     );
 
+    ["plugins", "pluginSearchDirs"].forEach(optionName => {
+      if (Array.isArray(merged[optionName])) {
+        merged[optionName] = merged[optionName].map(
+          value =>
+            typeof value === "string" && value.startsWith(".") // relative path
+              ? path.resolve(path.dirname(result.filepath), value)
+              : value
+        );
+      }
+    });
+
     if (!result && !editorConfigured) {
       return null;
     }


Test patch:
diff --git a/tests_integration/__tests__/config-resolution.js b/tests_integration/__tests__/config-resolution.js
index 25a610e533a9..d78a55eb84ae 100644
--- a/tests_integration/__tests__/config-resolution.js
+++ b/tests_integration/__tests__/config-resolution.js
@@ -226,3 +226,12 @@ test("API resolveConfig.sync removes $schema option", () => {
     tabWidth: 42
   });
 });
+
+test("API resolveConfig resolves relative path values based on config filepath", () => {
+  const currentDir = path.join(__dirname, "../cli/config/resolve-relative");
+  const parentDir = path.resolve(currentDir, "..");
+  expect(prettier.resolveConfig.sync(`${currentDir}/index.js`)).toMatchObject({
+    plugins: [path.join(parentDir, "path-to-plugin")],
+    pluginSearchDirs: [path.join(parentDir, "path-to-plugin-search-dir")]
+  });
+});
diff --git a/tests_integration/cli/config/resolve-relative/.prettierrc b/tests_integration/cli/config/resolve-relative/.prettierrc
new file mode 100644
index 000000000000..8d56196422e4
--- /dev/null
+++ b/tests_integration/cli/config/resolve-relative/.prettierrc
@@ -0,0 +1,4 @@
+{
+    "plugins": ["../path-to-plugin"],
+    "pluginSearchDirs": ["../path-to-plugin-search-dir"]
+}
Repository: prettier/prettier (JavaScript)
Task type: Bug Fix

Issue:
Changes ExpressionStatement into Directive
Input:

```js
("use strict")
```

Output:

```js
"use strict";
```

... which has changed the meaning of the code.

Expected:

```js
("use strict");
```

Found by reading [shift-codegen-js' source code](https://github.com/shapesecurity/shift-codegen-js/blob/8a9c8c1a72dd43044379bcd64003937caaa1678d/src/formatted-codegen.js#L1143-L1148)

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22(%5C%22use%20strict%5C%22)%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3Afalse%2C%22bracketSpacing%22%3Atrue%2C%22doc%22%3Afalse%7D%7D



Discussion:

Solution patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index 53ef717c2742..d4dbca3a3b9d 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -497,6 +497,11 @@ FPp.needsParens = function(assumeExpressionContext) {
         return name === "object" && parent.object === node;
       }
 
+    case "StringLiteral":
+      if (parent.type === "ExpressionStatement") {
+        return true;
+      }
+
     default:
       if (
         parent.type === "NewExpression" &&


Test patch:
diff --git a/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap b/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..54a281bd1d24
--- /dev/null
+++ b/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,18 @@
+exports[`test no_regression.js 1`] = `
+"// Ensure no regression.
+\"use strict\";
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Ensure no regression.
+\"use strict\";
+
+"
+`;
+
+exports[`test use_strict.js 1`] = `
+"// Parentheses around expression statement should be preserved in this case.
+(\"use strict\");
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Parentheses around expression statement should be preserved in this case.
+(\"use strict\");
+"
+`;
diff --git a/tests/expression_statement/jsfmt.spec.js b/tests/expression_statement/jsfmt.spec.js
new file mode 100755
index 000000000000..67caec39023b
--- /dev/null
+++ b/tests/expression_statement/jsfmt.spec.js
@@ -0,0 +1,2 @@
+// TODO: Re-enable Flow when the following fix is merged facebook/flow#3234.
+run_spec(__dirname, {parser: 'babylon'});
diff --git a/tests/expression_statement/no_regression.js b/tests/expression_statement/no_regression.js
new file mode 100644
index 000000000000..8a5e0f44d350
--- /dev/null
+++ b/tests/expression_statement/no_regression.js
@@ -0,0 +1,2 @@
+// Ensure no regression.
+"use strict";
diff --git a/tests/expression_statement/use_strict.js b/tests/expression_statement/use_strict.js
new file mode 100755
index 000000000000..31bce8687427
--- /dev/null
+++ b/tests/expression_statement/use_strict.js
@@ -0,0 +1,2 @@
+// Parentheses around expression statement should be preserved in this case.
+("use strict");
Repository: prettier/prettier (JavaScript)
Task type: Bug Fix

Issue:
Missing parenthesis around yield in conditional
```js
function* f() {
  a = (yield) ? null : null;
}
```

outputs

```js
function* f() {
  a = yield ? null : null;
}
```

which is invalid

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22function*%20f()%20%7B%5Cn%20%20a%20%3D%20(yield)%20%3F%20null%20%3A%20null%3B%5Cn%7D%5Cn%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3Afalse%2C%22bracketSpacing%22%3Afalse%2C%22doc%22%3Afalse%7D%7D


Discussion:

Solution patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index 0220b0ac2be4..1f9d015409aa 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -323,8 +323,13 @@ FPp.needsParens = function(assumeExpressionContext) {
           return true;
       }
 
-    case "AwaitExpression":
     case "YieldExpression":
+      if (parent.type === "ConditionalExpression" &&
+          parent.test === node &&
+          !node.argument) {
+        return true;
+      }
+    case "AwaitExpression":
       switch (parent.type) {
         case "TaggedTemplateExpression":
         case "BinaryExpression":


Test patch:
diff --git a/tests/yield/__snapshots__/jsfmt.spec.js.snap b/tests/yield/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..68d2aaeb07b6
--- /dev/null
+++ b/tests/yield/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,16 @@
+exports[`test conditional.js 1`] = `
+"function* f() {
+  a = (yield) ? 1 : 1;
+  a = yield 1 ? 1 : 1;
+  a = 1 ? yield : yield;
+  a = 1 ? yield 1 : yield 1;
+}
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function* f() {
+  a = (yield) ? 1 : 1;
+  a = yield 1 ? 1 : 1;
+  a = 1 ? yield : yield;
+  a = 1 ? yield 1 : yield 1;
+}
+"
+`;
diff --git a/tests/yield/conditional.js b/tests/yield/conditional.js
new file mode 100644
index 000000000000..8abd9d310ce2
--- /dev/null
+++ b/tests/yield/conditional.js
@@ -0,0 +1,6 @@
+function* f() {
+  a = (yield) ? 1 : 1;
+  a = yield 1 ? 1 : 1;
+  a = 1 ? yield : yield;
+  a = 1 ? yield 1 : yield 1;
+}
diff --git a/tests/yield/jsfmt.spec.js b/tests/yield/jsfmt.spec.js
new file mode 100644
index 000000000000..939578260648
--- /dev/null
+++ b/tests/yield/jsfmt.spec.js
@@ -0,0 +1,1 @@
+run_spec(__dirname, {parser: 'babylon'});
Repository: serverless/serverless (JavaScript)
Task type: Feature

Issue:
Allow warnings to be hidden
<!--
1. If you have a question and not a feature request please ask first at http://forum.serverless.com
2. Please check if an issue already exists. This feature may have already been requested
3. Check out and follow our Guidelines: https://github.com/serverless/serverless/blob/master/CONTRIBUTING.md
4. Fill out the whole template so we have a good overview on the issue
5. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue
6. Please follow the template, otherwise we'll have to ask you to update it
-->

# This is a Feature Proposal

## Description

I am working on a project at work which makes use of **Serverless**.

I have some SSM parameters that can be intentionally left undefined, and this behavior produces a warning for each undefined parameter.

I'd like to hide these warnings.

I already have a PR for it: https://github.com/serverless/serverless/pull/6345



Discussion:

Solution patch:
diff --git a/lib/classes/CLI.js b/lib/classes/CLI.js
index 80299ddf43a..4e26e801733 100644
--- a/lib/classes/CLI.js
+++ b/lib/classes/CLI.js
@@ -209,6 +209,12 @@ class CLI {
     this.consoleLog(chalk.yellow.underline('Framework'));
     this.consoleLog(chalk.dim('* Documentation: https://serverless.com/framework/docs/'));
 
+    this.consoleLog('');
+
+    this.consoleLog(chalk.yellow.underline('Environment Variables'));
+    this.consoleLog(chalk.dim('* Set SLS_DEBUG=* to see debugging logs'));
+    this.consoleLog(chalk.dim('* Set SLS_WARNING_DISABLE=* to hide warnings from the output'));
+
     this.consoleLog('');
     if (!_.isEmpty(this.loadedCommands)) {
       _.forEach(this.loadedCommands, (details, command) => {
diff --git a/lib/classes/Error.js b/lib/classes/Error.js
index c5f2e3ca1a8..75f8664ea32 100644
--- a/lib/classes/Error.js
+++ b/lib/classes/Error.js
@@ -97,6 +97,10 @@ module.exports.logError = e => {
 };
 
 module.exports.logWarning = message => {
+  if (process.env.SLS_WARNING_DISABLE) {
+    return;
+  }
+
   writeMessage('Serverless Warning', message);
 };
 


Test patch:
diff --git a/lib/classes/Error.test.js b/lib/classes/Error.test.js
index 43b10139415..47938e8b14b 100644
--- a/lib/classes/Error.test.js
+++ b/lib/classes/Error.test.js
@@ -110,6 +110,20 @@ describe('Error', () => {
       expect(message).to.have.string('SLS_DEBUG=*');
     });
 
+    it('should hide warnings if SLS_WARNING_DISABLE is defined', () => {
+      process.env.SLS_WARNING_DISABLE = '*';
+
+      logWarning('This is a warning');
+      logWarning('This is another warning');
+      logError(new Error('an error'));
+
+      const message = consoleLogSpy.args.join('\n');
+
+      expect(consoleLogSpy.called).to.equal(true);
+      expect(message).to.have.string('an error');
+      expect(message).not.to.have.string('This is a warning');
+    });
+
     it('should print stack trace with SLS_DEBUG', () => {
       process.env.SLS_DEBUG = '1';
       const error = new ServerlessError('a message');
Repository: serverless/serverless (JavaScript)
Task type: Refactoring

Issue:
Plugins Are Being Loaded Twice
##### Serverless Framework Version: V.1 Alpha 1
##### Operating System:  OSX 10.11.2
##### Expected Behavior:
- Plugins should be loaded once, causing hooks and all else to be set only once.
##### Actual Behavior:
- Plugins are loaded twice
- This is because they are each instantiated twice in the PluginManager, due to the way the Plugin commands and shortcuts code is written.  That code needs to be refactored to solve this problem and it could be improved generally.



Discussion:
Thanks for reporting! This is really not intended behavior. Will look into it ASAP.


Solution patch:
diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js
index 8bd9d73ea10..714fdab3365 100644
--- a/lib/classes/PluginManager.js
+++ b/lib/classes/PluginManager.js
@@ -129,13 +129,15 @@ class PluginManager {
   }
 
   addPlugin(Plugin) {
-    this.loadCommands(Plugin);
+    const pluginInstance = new Plugin(this.serverless, this.cliOptions);
+
+    this.loadCommands(pluginInstance);
 
     // shortcuts should be converted into options so that the plugin
     // author can use the option (instead of the shortcut)
     this.convertShortcutsIntoOptions(this.cliOptions, this.commands);
 
-    this.plugins.push(new Plugin(this.serverless, this.cliOptions));
+    this.plugins.push(pluginInstance);
   }
 
   loadCorePlugins() {
@@ -172,8 +174,8 @@ class PluginManager {
     }
   }
 
-  loadCommands(Plugin) {
-    this.commandsList.push((new Plugin(this.serverless)).commands);
+  loadCommands(pluginInstance) {
+    this.commandsList.push(pluginInstance.commands);
 
     // TODO: refactor ASAP as it slows down overall performance
     // rebuild the commands


Test patch:
diff --git a/tests/classes/PluginManager.js b/tests/classes/PluginManager.js
index 7dc65d6f4f7..79bfa8008b3 100644
--- a/tests/classes/PluginManager.js
+++ b/tests/classes/PluginManager.js
@@ -410,7 +410,8 @@ describe('PluginManager', () => {
 
   describe('#loadCommands()', () => {
     it('should load the plugin commands', () => {
-      pluginManager.loadCommands(SynchronousPluginMock);
+      const synchronousPluginMockInstance = new SynchronousPluginMock();
+      pluginManager.loadCommands(synchronousPluginMockInstance);
 
       expect(pluginManager.commandsList[0]).to.have.property('deploy');
     });
@@ -418,7 +419,8 @@ describe('PluginManager', () => {
 
   describe('#getEvents()', () => {
     beforeEach(() => {
-      pluginManager.loadCommands(SynchronousPluginMock);
+      const synchronousPluginMockInstance = new SynchronousPluginMock();
+      pluginManager.loadCommands(synchronousPluginMockInstance);
     });
 
     it('should get all the matching events for a root level command in the correct order', () => {
Repository: microsoft/vscode (TypeScript)
Task type: Bug Fix

Issue:
"Don't show again" action is not clickable / doesn't work
This message right here:
<img width="474" alt="image" src="https://user-images.githubusercontent.com/32465942/163148022-f0455cde-552d-44ad-a512-235a644b24da.png">

When i click on "Don't show again", it doesn't really work: as soon as i navigate to that input field again, it shows the same message again.

Version: 1.66.2
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36
Embedder: github.dev


Discussion:
`git bisect` says this regressed with https://github.com/microsoft/vscode/commit/69d1ad8c65c9fa412fdf9f29abaab1f950be447f.

Solution patch:
diff --git a/src/vs/base/browser/markdownRenderer.ts b/src/vs/base/browser/markdownRenderer.ts
--- a/src/vs/base/browser/markdownRenderer.ts
+++ b/src/vs/base/browser/markdownRenderer.ts
@@ -152,7 +152,7 @@ export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRende
 				.replace(/>/g, '&gt;')
 				.replace(/"/g, '&quot;')
 				.replace(/'/g, '&#39;');
-			return `<a data-href="${href}" title="${title || href}">${text}</a>`;
+			return `<a href="" data-href="${href}" title="${title || href}">${text}</a>`;
 		}
 	};
 	renderer.paragraph = (text): string => {


Test patch:
diff --git a/src/vs/base/test/browser/markdownRenderer.test.ts b/src/vs/base/test/browser/markdownRenderer.test.ts
--- a/src/vs/base/test/browser/markdownRenderer.test.ts
+++ b/src/vs/base/test/browser/markdownRenderer.test.ts
@@ -148,7 +148,7 @@ suite('MarkdownRenderer', () => {
 			mds.appendMarkdown(`[$(zap)-link](#link)`);
 
 			let result: HTMLElement = renderMarkdown(mds).element;
-			assert.strictEqual(result.innerHTML, `<p><a data-href="#link" title="#link"><span class="codicon codicon-zap"></span>-link</a></p>`);
+			assert.strictEqual(result.innerHTML, `<p><a href="" data-href="#link" title="#link"><span class="codicon codicon-zap"></span>-link</a></p>`);
 		});
 
 		test('render icon in table', () => {
@@ -168,7 +168,7 @@ suite('MarkdownRenderer', () => {
 </thead>
 <tbody><tr>
 <td><span class="codicon codicon-zap"></span></td>
-<td><a data-href="#link" title="#link"><span class="codicon codicon-zap"></span>-link</a></td>
+<td><a href="" data-href="#link" title="#link"><span class="codicon codicon-zap"></span>-link</a></td>
 </tr>
 </tbody></table>
 `);
Repository: microsoft/vscode (TypeScript)
Task type: Bug Fix

Issue:
Terminal cwd seems to be behind a command
At least, that's what it seems like. Testing https://github.com/microsoft/vscode/issues/141502 with Powershell 7

1. Follow the setup for `a` and `b`.
2. Open vscode in folder `a`
3. In the terminal, `cd ../b`
4. In the terminal, _type out_ `echo foo.txt` without hitting enter and ctrl+click `foo.txt`. `a/foo.txt` opens 🐛 
5. Hit enter, or run any other command. Even hitting enter on an empty prompt works.
6. Repeat step 4, but this time `b/foo.txt` opens correctly


Discussion:
Ah this is because the command doesn't get fully registered until it finishes, same root cause as https://github.com/microsoft/vscode/issues/143704
This works but the opened file has a strange breadcrumb: 
![image](https://user-images.githubusercontent.com/30305945/160063694-a049d701-f175-4409-8766-3af87f52f8f3.png)

Good URI (b/foo.txt):

![image](https://user-images.githubusercontent.com/2193314/160141140-fe5b2750-fd13-47e4-b330-ee11b94fa6b4.png)

Bad URI: (cd b; foo.txt)

![image](https://user-images.githubusercontent.com/2193314/160141304-3e59cb4e-4b85-4e17-a780-f52d37a808bd.png)

Fix will be here, maybe only happens on Windows:

https://github.com/microsoft/vscode/blob/1a93d4f70ea0e0cd5e821dbcf8b6f20d9a7187e3/src/vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers.ts#L150-L175

This is too risky imo for March.

Solution patch:
diff --git a/src/vs/workbench/contrib/terminal/browser/links/terminalLinkOpeners.ts b/src/vs/workbench/contrib/terminal/browser/links/terminalLinkOpeners.ts
--- a/src/vs/workbench/contrib/terminal/browser/links/terminalLinkOpeners.ts
+++ b/src/vs/workbench/contrib/terminal/browser/links/terminalLinkOpeners.ts
@@ -170,7 +170,8 @@ export class TerminalSearchLinkOpener implements ITerminalLinkOpener {
 		let resourceMatch: IResourceMatch | undefined;
 		if (osPathModule(this._os).isAbsolute(sanitizedLink)) {
 			const scheme = this._workbenchEnvironmentService.remoteAuthority ? Schemas.vscodeRemote : Schemas.file;
-			const uri = URI.from({ scheme, path: sanitizedLink });
+			const slashNormalizedPath = this._os === OperatingSystem.Windows ? sanitizedLink.replace(/\\/g, '/') : sanitizedLink;
+			const uri = URI.from({ scheme, path: slashNormalizedPath });
 			try {
 				const fileStat = await this._fileService.stat(uri);
 				resourceMatch = { uri, isDirectory: fileStat.isDirectory };


Test patch:
diff --git a/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkOpeners.test.ts b/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkOpeners.test.ts
--- a/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkOpeners.test.ts
+++ b/src/vs/workbench/contrib/terminal/test/browser/links/terminalLinkOpeners.test.ts
@@ -177,7 +177,7 @@ suite('Workbench - TerminalLinkOpeners', () => {
 					type: TerminalBuiltinLinkType.Search
 				});
 				deepStrictEqual(activationResult, {
-					link: 'file:///c%3A%5CUsers%5Chome%5Cfolder%5Cfile.txt',
+					link: 'file:///c%3A/Users/home/folder/file.txt',
 					source: 'editor'
 				});