XUO/SWE-PolyBench huggingface dataset:
Repository: prettier/prettier (JavaScript) — Bug Fix

Issue:
Chained unary + are missing parenthesis

```js
x + + + + 1
x + (+ (+ (+ 1)))
```

is printed as

```js
x + +++1;
x + +++1;
```

which is not correct.

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22x%20%2B%20%2B%20%2B%20%2B%201%5Cnx%20%2B%20(%2B%20(%2B%20(%2B%201)))%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%3Atrue%7D%7D


Discussion:

Resolving patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index 634bdda6394b..cbd209355ae3 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -229,12 +229,21 @@ FPp.needsParens = function(assumeExpressionContext) {
 
   switch (node.type) {
     case "UpdateExpression":
-    case "UnaryExpression":
     case "SpreadElement":
     case "SpreadProperty":
       return parent.type === "MemberExpression" && name === "object" &&
         parent.object === node;
 
+    case "UnaryExpression":
+      switch (parent.type) {
+        case "UnaryExpression":
+          return node.operator === parent.operator &&
+            (node.operator === "+" || node.operator === "-");
+
+        case "MemberExpression":
+          return name === "object" && parent.object === node;
+      }
+
     case "BinaryExpression":
     case "LogicalExpression":
       switch (parent.type) {


Test patch:
diff --git a/tests/urnary_expression/__snapshots__/jsfmt.spec.js.snap b/tests/urnary_expression/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..bbc577738934
--- /dev/null
+++ b/tests/urnary_expression/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,16 @@
+exports[`test urnary_expression.js 1`] = `
+"!!x
+x++
+x--;
+-+1;
+x + + + + 1;
+x + (+ (+ (+ 1)))
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!!x;
+x++;
+x--;
+-+1;
+x + (+(+(+1)));
+x + (+(+(+1)));
+"
+`;
diff --git a/tests/urnary_expression/jsfmt.spec.js b/tests/urnary_expression/jsfmt.spec.js
new file mode 100644
index 000000000000..989047bccc52
--- /dev/null
+++ b/tests/urnary_expression/jsfmt.spec.js
@@ -0,0 +1,1 @@
+run_spec(__dirname);
diff --git a/tests/urnary_expression/urnary_expression.js b/tests/urnary_expression/urnary_expression.js
new file mode 100644
index 000000000000..1d22e1916bfc
--- /dev/null
+++ b/tests/urnary_expression/urnary_expression.js
@@ -0,0 +1,6 @@
+!!x
+x++
+x--;
+-+1;
+x + + + + 1;
+x + (+ (+ (+ 1)))
Repository: prettier/prettier (JavaScript) — Bug Fix

Issue:
new is missing parenthesis
input

```js
new (memoize.Cache || MapCache);
new (typeof this == "function" ? this : Dict())
```

output

```js
new memoize.Cache || MapCache();
new typeof this == "function" ? this : Dict()();
```

https://jlongster.github.io/prettier/#%7B%22content%22%3A%22new%20(memoize.Cache%20%7C%7C%20MapCache)%3B%5Cnnew%20(typeof%20this%20%3D%3D%20%5C%22function%5C%22%20%3F%20this%20%3A%20Dict())%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%3Atrue%7D%7D


Discussion:

Resolving patch:
diff --git a/src/fast-path.js b/src/fast-path.js
index bcc19b505a20..634bdda6394b 100644
--- a/src/fast-path.js
+++ b/src/fast-path.js
@@ -239,6 +239,7 @@ FPp.needsParens = function(assumeExpressionContext) {
     case "LogicalExpression":
       switch (parent.type) {
         case "CallExpression":
+        case "NewExpression":
           return name === "callee" && parent.callee === node;
 
         case "UnaryExpression":
@@ -340,6 +341,7 @@ FPp.needsParens = function(assumeExpressionContext) {
         case "SpreadProperty":
         case "BinaryExpression":
         case "LogicalExpression":
+        case "NewExpression":
           return true;
 
         case "CallExpression":


Test patch:
diff --git a/tests/new_expression/__snapshots__/jsfmt.spec.js.snap b/tests/new_expression/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..b59887491684
--- /dev/null
+++ b/tests/new_expression/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,8 @@
+exports[`test new_expression.js 1`] = `
+"new (memoize.Cache || MapCache)
+new (typeof this == \"function\" ? this : Dict())
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+new (memoize.Cache || MapCache)();
+new (typeof this == \"function\" ? this : Dict())();
+"
+`;
diff --git a/tests/new_expression/jsfmt.spec.js b/tests/new_expression/jsfmt.spec.js
new file mode 100644
index 000000000000..989047bccc52
--- /dev/null
+++ b/tests/new_expression/jsfmt.spec.js
@@ -0,0 +1,1 @@
+run_spec(__dirname);
diff --git a/tests/new_expression/new_expression.js b/tests/new_expression/new_expression.js
new file mode 100644
index 000000000000..23166585ad45
--- /dev/null
+++ b/tests/new_expression/new_expression.js
@@ -0,0 +1,2 @@
+new (memoize.Cache || MapCache)
+new (typeof this == "function" ? this : Dict())
Repository: prettier/prettier (JavaScript) — Bug Fix

Issue:
Invalid flow annotation
I ran prettier against our large-ish codebase, and aside from several instances of #23, I got one error:

![1 pc2 0 git - nikkisix local tmux 2017-01-10 13-06-05](https://cloud.githubusercontent.com/assets/7150/21818410/b8b083be-d735-11e6-8ab7-804f93b72abd.png)

where prettier put a colon in front of the `any`. Simply removing the colon makes it valid.
Invalid flow annotation
I ran prettier against our large-ish codebase, and aside from several instances of #23, I got one error:

![1 pc2 0 git - nikkisix local tmux 2017-01-10 13-06-05](https://cloud.githubusercontent.com/assets/7150/21818410/b8b083be-d735-11e6-8ab7-804f93b72abd.png)

where prettier put a colon in front of the `any`. Simply removing the colon makes it valid.


Discussion:
just for reference: this is Flow's ["optional name" syntax](https://github.com/babel/babylon/pull/197) on function types & object indexers
just for reference: this is Flow's ["optional name" syntax](https://github.com/babel/babylon/pull/197) on function types & object indexers

Resolving patch:
diff --git a/src/printer.js b/src/printer.js
index 6e71a04e7704..c409256576c5 100644
--- a/src/printer.js
+++ b/src/printer.js
@@ -1329,7 +1329,7 @@ function genericPrintNoParens(path, options, print) {
     return concat([
       path.call(print, "name"),
       n.optional ? "?" : "",
-      ": ",
+      n.name ? ": " : "",
       path.call(print, "typeAnnotation")
     ]);
   case "GenericTypeAnnotation":
@@ -1399,7 +1399,7 @@ function genericPrintNoParens(path, options, print) {
       variance,
       "[",
       path.call(print, "id"),
-      ": ",
+      n.id ? ": " : "",
       path.call(print, "key"),
       "]: ",
       path.call(print, "value")


Test patch:
diff --git a/tests/prettier/__snapshots__/jsfmt.spec.js.snap b/tests/prettier/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..a1221a5a1de1
--- /dev/null
+++ b/tests/prettier/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,9 @@
+exports[`test optional-type-name.js 1`] = `
+"type Foo = (any) => string
+
+type Bar = { [string]: number }
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+type Foo = (any) => string;
+
+type Bar = { [string]: number };"
+`;
diff --git a/tests/prettier/jsfmt.spec.js b/tests/prettier/jsfmt.spec.js
new file mode 100644
index 000000000000..989047bccc52
--- /dev/null
+++ b/tests/prettier/jsfmt.spec.js
@@ -0,0 +1,1 @@
+run_spec(__dirname);
diff --git a/tests/prettier/optional-type-name.js b/tests/prettier/optional-type-name.js
new file mode 100644
index 000000000000..fb40895ab58f
--- /dev/null
+++ b/tests/prettier/optional-type-name.js
@@ -0,0 +1,3 @@
+type Foo = (any) => string
+
+type Bar = { [string]: number }
Repository: serverless/serverless (JavaScript) — Feature

Issue:
HttpApi in cloudformation stack output
### API Gateway HttpApi not present in cloudformation stack output

I'd like to import the HttpApi id in another cloudformation stack for creating cloudwatch alarms. This is currently not exported.

### Proposed solution

Export the value of HttpApi cloudformation resource along with the currently exported url


Discussion:
@captainsano thanks for proposal. We're definitely open for it. PR that implements that is welcome!
@medikoo Thanks! I'd love to take this up :-D Here's how I thought I would go about this,

- Add the output for HttpApi in `httpApi.js`, also add a corresponding test in `httpApi.test.js` expecting the output to have value. These files are under `lib/plugins/aws/package/compile/events/`.
@captainsano you've got it perfectly. PR is welcome!

Resolving patch:
diff --git a/lib/plugins/aws/package/compile/events/httpApi.js b/lib/plugins/aws/package/compile/events/httpApi.js
index 970dcaa3cb4..4d1ecd2eb8e 100644
--- a/lib/plugins/aws/package/compile/events/httpApi.js
+++ b/lib/plugins/aws/package/compile/events/httpApi.js
@@ -148,6 +148,10 @@ class HttpApiEvents {
       };
       resource.DependsOn = this.provider.naming.getHttpApiLogGroupLogicalId();
     }
+    this.cfTemplate.Outputs.HttpApiId = {
+      Description: 'Id of the HTTP API',
+      Value: { Ref: this.provider.naming.getHttpApiLogicalId() },
+    };
     this.cfTemplate.Outputs.HttpApiUrl = {
       Description: 'URL of the HTTP API',
       Value: {


Test patch:
diff --git a/test/unit/lib/plugins/aws/package/compile/events/httpApi.test.js b/test/unit/lib/plugins/aws/package/compile/events/httpApi.test.js
index 4e933d234ba..44c089b5ec6 100644
--- a/test/unit/lib/plugins/aws/package/compile/events/httpApi.test.js
+++ b/test/unit/lib/plugins/aws/package/compile/events/httpApi.test.js
@@ -58,7 +58,12 @@ describe('lib/plugins/aws/package/compile/events/httpApi.test.js', () => {
       expect(resource.Properties.AutoDeploy).to.equal(true);
     });
 
-    it('should configure output', () => {
+    it('should configure output for HttpApiId', () => {
+      const output = cfOutputs.HttpApiId;
+      expect(output).to.have.property('Value');
+    });
+
+    it('should configure output for HttpApiUrl', () => {
       const output = cfOutputs.HttpApiUrl;
       expect(output).to.have.property('Value');
     });
@@ -481,6 +486,7 @@ describe('lib/plugins/aws/package/compile/events/httpApi.test.js', () => {
         expect(cfResources).to.not.have.property(naming.getHttpApiStageLogicalId());
       });
       it('should not configure output', () => {
+        expect(cfOutputs).to.not.have.property('HttpApiId');
         expect(cfOutputs).to.not.have.property('HttpApiUrl');
       });
       it('should configure endpoint that attaches to external API', () => {
Repository: serverless/serverless (JavaScript) — Bug Fix

Issue:
Resources count displayed by sls info shows max of 100.
# Bug Report

The resource count # show by sls info will max out at 100.

The Cloudformation listStackResources API call is paginated and 

https://github.com/serverless/serverless/blob/7479a9ae82b44fb06de3ab84094b18e8f72affc4/lib/plugins/aws/info/getResourceCount.js#L1-L19

is only counting the first page of results.





Discussion:

Resolving patch:
diff --git a/lib/plugins/aws/info/getResourceCount.js b/lib/plugins/aws/info/getResourceCount.js
index abe00ac4c15..6dda2c8a7cf 100644
--- a/lib/plugins/aws/info/getResourceCount.js
+++ b/lib/plugins/aws/info/getResourceCount.js
@@ -4,16 +4,19 @@ const BbPromise = require('bluebird');
 const _ = require('lodash');
 
 module.exports = {
-  getResourceCount() {
-    const stackName = this.provider.naming.getStackName();
-
-    return this.provider
-      .request('CloudFormation', 'listStackResources', { StackName: stackName })
-      .then(result => {
-        if (!_.isEmpty(result)) {
-          this.gatheredData.info.resourceCount = result.StackResourceSummaries.length;
+  getResourceCount(nextToken, resourceCount = 0) {
+    const params = {
+      StackName: this.provider.naming.getStackName(),
+      NextToken: nextToken,
+    };
+    return this.provider.request('CloudFormation', 'listStackResources', params).then(result => {
+      if (!_.isEmpty(result)) {
+        this.gatheredData.info.resourceCount = resourceCount + result.StackResourceSummaries.length;
+        if (result.NextToken) {
+          return this.getResourceCount(result.NextToken, this.gatheredData.info.resourceCount);
         }
-        return BbPromise.resolve();
-      });
+      }
+      return BbPromise.resolve();
+    });
   },
 };


Test patch:
diff --git a/lib/plugins/aws/info/getResourceCount.test.js b/lib/plugins/aws/info/getResourceCount.test.js
index 2dfa0baba44..89ace1fba7e 100644
--- a/lib/plugins/aws/info/getResourceCount.test.js
+++ b/lib/plugins/aws/info/getResourceCount.test.js
@@ -131,6 +131,7 @@ describe('#getResourceCount()', () => {
       expect(
         listStackResourcesStub.calledWithExactly('CloudFormation', 'listStackResources', {
           StackName: awsInfo.provider.naming.getStackName(),
+          NextToken: undefined,
         })
       ).to.equal(true);
Repository: serverless/serverless (JavaScript) — 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:

Resolving 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) — Feature

Issue:
Allow non-alphanumeric characters for websocket routes
# Allow non-alphanumeric characters for websocket routes

## Description

When deploying a websocket route, you will get an error, if you use a non-alphanumeric name for the route. This is more restrictive than what APIGateway allows.

I couldn't find a documentation from AWS regarding the allowed characters. By trial&error I found out, that at least the following characters are allowed in route names:
* `/`
* `-`
* `_`
* `.`

Serverless framework should allow the use of these characters too.


## Additional Data

In the past, we have solved similar issues by simply sanitizing the names for the Cloudformation Stack entries:

`
orgName => orgName.replace(/_/g, 'Underscore').replace(/-/g, 'Dash').replace(/\./g, 'Point').replace(/\//g, 'Slash')
`


Discussion:

Resolving patch:
diff --git a/lib/plugins/aws/lib/naming.js b/lib/plugins/aws/lib/naming.js
index 21631aa63d8..31f1efd772c 100644
--- a/lib/plugins/aws/lib/naming.js
+++ b/lib/plugins/aws/lib/naming.js
@@ -181,7 +181,12 @@ module.exports = {
   },
 
   getNormalizedWebsocketsRouteKey(route) {
-    return route.replace('$', 'S');
+    return route
+      .replace('$', 'S') // dollar sign
+      .replace('/', 'Slash')
+      .replace('-', 'Dash')
+      .replace('_', 'Underscore')
+      .replace('.', 'Period');
   },
 
   getWebsocketsRouteLogicalId(route) {


Test patch:
diff --git a/lib/plugins/aws/lib/naming.test.js b/lib/plugins/aws/lib/naming.test.js
index 643981306a9..8395f8a1773 100644
--- a/lib/plugins/aws/lib/naming.test.js
+++ b/lib/plugins/aws/lib/naming.test.js
@@ -259,6 +259,18 @@ describe('#naming()', () => {
     it('should return a normalized version of the route key', () => {
       expect(sdk.naming.getNormalizedWebsocketsRouteKey('$connect'))
         .to.equal('Sconnect');
+
+      expect(sdk.naming.getNormalizedWebsocketsRouteKey('foo/bar'))
+        .to.equal('fooSlashbar');
+
+      expect(sdk.naming.getNormalizedWebsocketsRouteKey('foo-bar'))
+        .to.equal('fooDashbar');
+
+      expect(sdk.naming.getNormalizedWebsocketsRouteKey('foo_bar'))
+        .to.equal('fooUnderscorebar');
+
+      expect(sdk.naming.getNormalizedWebsocketsRouteKey('foo.bar'))
+        .to.equal('fooPeriodbar');
     });
   });
Repository: serverless/serverless (JavaScript) — Bug Fix

Issue:
Allow explicit name for authorisers specified by arn.
# This is a Bug

## Description

Serverless (v1.25.0) does not respect the 'name' property if 'arn' is specified for an authorizer.

This is unexpected- but is especially problematic because it stops you using the same authorizer function with different configurations (e.g. cached/non-cached) across the same service.

Similar or dependent issues:
* #3413 mentions this in the commentary below, but is focused on the sanity of the implict naming function.


Discussion:

Resolving patch:
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js
index 03dcbcfb259..bbafbb75163 100644
--- a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js
+++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js
@@ -220,7 +220,11 @@ module.exports = {
         type = 'AWS_IAM';
       } else if (authorizer.arn) {
         arn = authorizer.arn;
-        name = this.provider.naming.extractAuthorizerNameFromArn(arn);
+        if (_.isString(authorizer.name)) {
+          name = authorizer.name;
+        } else {
+          name = this.provider.naming.extractAuthorizerNameFromArn(arn);
+        }
       } else if (authorizer.name) {
         name = authorizer.name;
         arn = this.getLambdaArn(name);


Test patch:
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js
index 6338005f271..a2132f048e0 100644
--- a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js
+++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js
@@ -934,6 +934,30 @@ describe('#validate()', () => {
     expect(validated.events[0].http.authorizer.arn).to.equal('xxx:dev-authorizer');
   });
 
+  it('should handle an authorizer.arn with an explicit authorizer.name object', () => {
+    awsCompileApigEvents.serverless.service.functions = {
+      first: {
+        events: [
+          {
+            http: {
+              path: 'foo/bar',
+              method: 'GET',
+              authorizer: {
+                arn: 'xxx:dev-authorizer',
+                name: 'custom-name',
+              },
+            },
+          },
+        ],
+      },
+    };
+
+    const validated = awsCompileApigEvents.validate();
+    expect(validated.events).to.be.an('Array').with.length(1);
+    expect(validated.events[0].http.authorizer.name).to.equal('custom-name');
+    expect(validated.events[0].http.authorizer.arn).to.equal('xxx:dev-authorizer');
+  });
+
   it('should throw an error if the provided config is not an object', () => {
     awsCompileApigEvents.serverless.service.functions = {
       first: {
Repository: serverless/serverless (JavaScript) — Feature

Issue:
CORS: Add `X-Amz-User-Agent` to list of allowed headers
# This is a Feature Request

## Description

I'm using the default CORS options in our backend Lambda to allow our frontend to access it via JavaScript. In order to make this work properly I needed to add `X-Amz-User-Agent` to the list of `Access-Control-Allow-Origin` headers as shown in this example:

```yaml
functions:
  api:
    handler: handlers/api/handler.handler
    description: General API
    events:
      - http:
          path: api/{any+}
          method: GET
          cors:
            origins:
              - '*'
            headers:
              - Content-Type
              - Authorization
              - X-Amz-Date
              - X-Amz-Security-Token
              - X-Amz-User-Agent      # <-- have to add this manually!
              - X-Api-Key
          authorizer: aws_iam
```

My request is to simply add `X-Amz-User-Agent` as a default allowed header. That would make things much simpler.

## Additional Data

* ***Serverless Framework Version you're using***: 1.12.1



Discussion:

Resolving patch:
diff --git a/docs/providers/aws/events/apigateway.md b/docs/providers/aws/events/apigateway.md
index 255f5466f99..e4e5385b1aa 100644
--- a/docs/providers/aws/events/apigateway.md
+++ b/docs/providers/aws/events/apigateway.md
@@ -123,6 +123,7 @@ functions:
               - Authorization
               - X-Api-Key
               - X-Amz-Security-Token
+              - X-Amz-User-Agent
             allowCredentials: false
 ```
 
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js
index a3a57387173..365cafe8e6e 100644
--- a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js
+++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js
@@ -269,6 +269,7 @@ module.exports = {
       'Authorization',
       'X-Api-Key',
       'X-Amz-Security-Token',
+      'X-Amz-User-Agent',
     ];
 
     let cors = {


Test patch:
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js
index d175bcdd4b6..433126e1fa3 100644
--- a/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js
+++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.test.js
@@ -433,7 +433,8 @@ describe('#validate()', () => {
     const validated = awsCompileApigEvents.validate();
     expect(validated.events).to.be.an('Array').with.length(1);
     expect(validated.events[0].http.cors).to.deep.equal({
-      headers: ['Content-Type', 'X-Amz-Date', 'Authorization', 'X-Api-Key', 'X-Amz-Security-Token'],
+      headers: ['Content-Type', 'X-Amz-Date', 'Authorization', 'X-Api-Key',
+        'X-Amz-Security-Token', 'X-Amz-User-Agent'],
       methods: ['OPTIONS', 'POST'],
       origins: ['*'],
       allowCredentials: false,
Repository: serverless/serverless (JavaScript) — Feature

Issue:
Missing description for Lambda Version
# This is a Feature Proposal

## Description

Version of Lambda function is supported to add the properties of "Description" on [publish version](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#publishVersion-property). Append the function description into version if specified, it is ease to use and great presentation to determine what is it for each version.



Discussion:

Resolving patch:
diff --git a/lib/plugins/aws/deploy/compile/functions/index.js b/lib/plugins/aws/deploy/compile/functions/index.js
index 3df59a6a67d..7f9c21bfcfa 100644
--- a/lib/plugins/aws/deploy/compile/functions/index.js
+++ b/lib/plugins/aws/deploy/compile/functions/index.js
@@ -177,6 +177,9 @@ class AwsCompileFunctions {
 
     newVersion.Properties.CodeSha256 = hash.read();
     newVersion.Properties.FunctionName = { Ref: functionLogicalId };
+    if (functionObject.description) {
+      newVersion.Properties.Description = functionObject.description;
+    }
 
     // use the SHA in the logical resource ID of the version because
     // AWS::Lambda::Version resource will not support updates


Test patch:
diff --git a/lib/plugins/aws/deploy/compile/functions/index.test.js b/lib/plugins/aws/deploy/compile/functions/index.test.js
index ebe49c047e7..f243931543b 100644
--- a/lib/plugins/aws/deploy/compile/functions/index.test.js
+++ b/lib/plugins/aws/deploy/compile/functions/index.test.js
@@ -924,6 +924,23 @@ describe('AwsCompileFunctions', () => {
       );
     });
 
+    it('should include description under version too if function is specified', () => {
+      awsCompileFunctions.serverless.service.functions = {
+        func: {
+          handler: 'func.function.handler',
+          description: 'Lambda function description',
+        },
+      };
+
+      awsCompileFunctions.compileFunctions();
+
+      expect(
+        awsCompileFunctions.serverless.service.provider.compiledCloudFormationTemplate
+          .Resources.FuncLambdaVersionw6uP8Tcg6K2QR905Rms8iXTlksL6OD1KOWBxTK7wxPI
+        .Properties.Description
+      ).to.equal('Lambda function description');
+    });
+
     it('should not create function output objects when "versionFunctions" is false', () => {
       awsCompileFunctions.serverless.service.provider.versionFunctions = false;
       awsCompileFunctions.serverless.service.functions = {
Repository: serverless/serverless (JavaScript) — Feature

Issue:
Include Multiple Resource Files
# This is a Feature Proposal

## Description
This feature enables multiple resource files to be included in the 'Resources' section.  This enables larger services to include sub resource files independantly.  One resource file can be broken up a number to enable better independant managability / change control as these files can get large and hard to manage in larger implementations.

e.g 

```yml
resources:
  Resources:
    - ${file(resources/first-cf-resources.yml)}
    - ${file(resources/second-cf-resources.yml)}
```


Discussion:

Resolving patch:
diff --git a/lib/classes/Service.js b/lib/classes/Service.js
index 871ab8822e8..eca7aa75713 100644
--- a/lib/classes/Service.js
+++ b/lib/classes/Service.js
@@ -86,6 +86,12 @@ class Service {
           throw new SError(errorMessage);
         }
 
+        if (Array.isArray(serverlessFile.resources)) {
+          serverlessFile.resources = serverlessFile.resources.reduce((memo, value) =>
+            Object.assign(memo, value)
+          , {});
+        }
+
         that.service = serverlessFile.service;
         that.provider = serverlessFile.provider;
         that.custom = serverlessFile.custom;


Test patch:
diff --git a/lib/classes/Service.test.js b/lib/classes/Service.test.js
index 91b0baf049a..3c833624acc 100644
--- a/lib/classes/Service.test.js
+++ b/lib/classes/Service.test.js
@@ -169,6 +169,37 @@ describe('Service', () => {
       });
     });
 
+    it('should merge resources given as an array', () => {
+      const SUtils = new Utils();
+      const serverlessYml = {
+        service: 'new-service',
+        provider: 'aws',
+        resources: [
+          {
+            aws: {
+              resourcesProp: 'value',
+            },
+          },
+          {
+            azure: {},
+          },
+        ],
+      };
+
+      SUtils.writeFileSync(path.join(tmpDirPath, 'serverless.yml'),
+        YAML.dump(serverlessYml));
+
+      const serverless = new Serverless();
+      serverless.init();
+      serverless.config.update({ servicePath: tmpDirPath });
+      serviceInstance = new Service(serverless);
+
+      return serviceInstance.load().then(() => {
+        expect(serviceInstance.resources.aws).to.deep.equal({ resourcesProp: 'value' });
+        expect(serviceInstance.resources.azure).to.deep.equal({});
+      });
+    });
+
     it('should make sure function name contains the default stage', () => {
       const SUtils = new Utils();
       const serverlessYml = {
Repository: serverless/serverless (JavaScript) — Bug Fix

Issue:
Other provider values (than aws) are not supported
# This is a Bug Report
## Description

If I switch the provider property in my `serverless.yml` file from e.g. `aws` to `ibm` or `google` I get the error message that this provider is not supported and I should chosse from a list with supported providers (supported providers include `ibm` and `google`).



Discussion:

Resolving patch:
diff --git a/lib/classes/Service.js b/lib/classes/Service.js
index 24b50630373..32fd3d62020 100644
--- a/lib/classes/Service.js
+++ b/lib/classes/Service.js
@@ -69,7 +69,7 @@ class Service {
           };
         }
 
-        if (['aws', 'azure', 'google', 'ibm'].indexOf(serverlessFile.provider.name)) {
+        if (['aws', 'azure', 'google', 'ibm'].indexOf(serverlessFile.provider.name) === -1) {
           const errorMessage = [
             `Provider "${serverlessFile.provider.name}" is not supported.`,
             ' Valid values for provider are: aws, azure, google, ibm.',


Test patch:
diff --git a/tests/classes/Service.js b/tests/classes/Service.js
index e39a8079911..520361f7498 100644
--- a/tests/classes/Service.js
+++ b/tests/classes/Service.js
@@ -207,6 +207,37 @@ describe('Service', () => {
       });
     });
 
+    it('should support Serverless file with a non-aws provider', () => {
+      const SUtils = new Utils();
+      const serverlessYaml = {
+        service: 'my-service',
+        provider: 'ibm',
+        functions: {
+          functionA: {
+            name: 'customFunctionName',
+          },
+        },
+      };
+
+      SUtils.writeFileSync(path.join(tmpDirPath, 'serverless.yaml'),
+        YAML.dump(serverlessYaml));
+
+      const serverless = new Serverless({ servicePath: tmpDirPath });
+      serviceInstance = new Service(serverless);
+
+      return serviceInstance.load().then(() => {
+        const expectedFunc = {
+          functionA: {
+            name: 'customFunctionName',
+            events: [],
+          },
+        };
+        expect(serviceInstance.service).to.be.equal('my-service');
+        expect(serviceInstance.provider.name).to.deep.equal('ibm');
+        expect(serviceInstance.functions).to.deep.equal(expectedFunc);
+      });
+    });
+
     it('should support Serverless file with a .yaml extension', () => {
       const SUtils = new Utils();
       const serverlessYaml = {
Repository: serverless/serverless (JavaScript) — Bug Fix

Issue:
API Gateway returns 200 when function times out
# This is a Bug Report
## Description
- What went wrong?
  When a lambda function times out, API Gateway still returns a 200 OK status code
- What should have happened?
  API Gateway should return a 500 or 504 status code when a lambda function times out
- What was the config you used?
  Serverless 1.0 RC1

The code change for this is very simple. PR to follow shortly



Discussion:

Resolving patch:
diff --git a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js
index 521925868de..e150d834ef9 100644
--- a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js
+++ b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js
@@ -333,7 +333,8 @@ module.exports = {
             { StatusCode: 422, SelectionPattern: '.*\\[422\\].*' },
             { StatusCode: 500,
               SelectionPattern:
-                '.*(Process\\s?exited\\s?before\\s?completing\\s?request|\\[500\\]).*' },
+                // eslint-disable-next-line max-len
+                '.*(Process\\s?exited\\s?before\\s?completing\\s?request|Task\\s?timed\\s?out\\s?|\\[500\\]).*' },
             { StatusCode: 502, SelectionPattern: '.*\\[502\\].*' },
             { StatusCode: 504, SelectionPattern: '.*\\[504\\].*' }
           );


Test patch:
diff --git a/lib/plugins/aws/deploy/compile/events/apiGateway/tests/methods.js b/lib/plugins/aws/deploy/compile/events/apiGateway/tests/methods.js
index 563eb505342..ab169a668bc 100644
--- a/lib/plugins/aws/deploy/compile/events/apiGateway/tests/methods.js
+++ b/lib/plugins/aws/deploy/compile/events/apiGateway/tests/methods.js
@@ -665,7 +665,9 @@ describe('#compileMethods()', () => {
         awsCompileApigEvents.serverless.service.provider.compiledCloudFormationTemplate
           .Resources.ApiGatewayMethodUsersListGet.Properties.Integration.IntegrationResponses[6]
       ).to.deep.equal({ StatusCode: 500,
-        SelectionPattern: '.*(Process\\s?exited\\s?before\\s?completing\\s?request|\\[500\\]).*' });
+        SelectionPattern:
+          // eslint-disable-next-line max-len
+          '.*(Process\\s?exited\\s?before\\s?completing\\s?request|Task\\s?timed\\s?out\\s?|\\[500\\]).*' });
       expect(
         awsCompileApigEvents.serverless.service.provider.compiledCloudFormationTemplate
           .Resources.ApiGatewayMethodUsersListGet.Properties.Integration.IntegrationResponses[7]
Repository: serverless/serverless (JavaScript) — 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.


Resolving 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) — Bug Fix

Issue:
Diffing two empty files shows them as having changes
<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.51.1
- OS Version: Windows 10

Steps to Reproduce:

1. Diff two empty files (or an empty file against itself)
2. Notice the diff view shows "removed" and "added" lines:

![image](https://user-images.githubusercontent.com/67761731/102942100-484a0f00-4469-11eb-8d87-a7ff583b94c7.png)

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

This behavior is surprising since a file with a single newline shows no differences. So why should an empty file be shown as having differences?

This is important to me because I am using the monaco diff editor, and do not want it to show any differences when both sides are empty.


Discussion:

Resolving patch:
diff --git a/src/vs/editor/common/diff/diffComputer.ts b/src/vs/editor/common/diff/diffComputer.ts
--- a/src/vs/editor/common/diff/diffComputer.ts
+++ b/src/vs/editor/common/diff/diffComputer.ts
@@ -313,6 +313,13 @@ export class DiffComputer {
 
 		if (this.original.lines.length === 1 && this.original.lines[0].length === 0) {
 			// empty original => fast path
+			if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) {
+				return {
+					quitEarly: false,
+					changes: []
+				};
+			}
+
 			return {
 				quitEarly: false,
 				changes: [{


Test patch:
diff --git a/src/vs/editor/test/common/diff/diffComputer.test.ts b/src/vs/editor/test/common/diff/diffComputer.test.ts
--- a/src/vs/editor/test/common/diff/diffComputer.test.ts
+++ b/src/vs/editor/test/common/diff/diffComputer.test.ts
@@ -462,6 +462,13 @@ suite('Editor Diff - DiffComputer', () => {
 		assertDiff(original, modified, expected, true, false, true);
 	});
 
+	test('empty diff 5', () => {
+		let original = [''];
+		let modified = [''];
+		let expected: ILineChange[] = [];
+		assertDiff(original, modified, expected, true, false, true);
+	});
+
 	test('pretty diff 1', () => {
 		let original = [
 			'suite(function () {',
Repository: microsoft/vscode (TypeScript) — 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.

Resolving 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) — 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.

Resolving 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'
 				});
Repository: microsoft/vscode (TypeScript) — Bug Fix

Issue:
Error: Remote authorities containing '+' need to be resolved!
This is impacting Codespaces

![image](https://user-images.githubusercontent.com/5047891/173090258-a921dfe7-2ecd-47b1-9a1e-ac0a7b582742.png)


Discussion:

Resolving patch:
diff --git a/src/vs/platform/remote/common/remoteHosts.ts b/src/vs/platform/remote/common/remoteHosts.ts
--- a/src/vs/platform/remote/common/remoteHosts.ts
+++ b/src/vs/platform/remote/common/remoteHosts.ts
@@ -51,10 +51,6 @@ export function parseAuthorityWithOptionalPort(authority: string, defaultPort: n
 }
 
 function parseAuthority(authority: string): { host: string; port: number | undefined } {
-	if (authority.indexOf('+') >= 0) {
-		throw new Error(`Remote authorities containing '+' need to be resolved!`);
-	}
-
 	// check for ipv6 with port
 	const m1 = authority.match(/^(\[[0-9a-z:]+\]):(\d+)$/);
 	if (m1) {


Test patch:
diff --git a/src/vs/platform/remote/test/common/remoteHosts.test.ts b/src/vs/platform/remote/test/common/remoteHosts.test.ts
--- a/src/vs/platform/remote/test/common/remoteHosts.test.ts
+++ b/src/vs/platform/remote/test/common/remoteHosts.test.ts
@@ -35,4 +35,8 @@ suite('remoteHosts', () => {
 		assert.deepStrictEqual(parseAuthorityWithOptionalPort('[2001:0db8:85a3:0000:0000:8a2e:0370:7334]', 123), { host: '[2001:0db8:85a3:0000:0000:8a2e:0370:7334]', port: 123 });
 	});
 
+	test('issue #151748: Error: Remote authorities containing \'+\' need to be resolved!', () => {
+		assert.deepStrictEqual(parseAuthorityWithOptionalPort('codespaces+aaaaa-aaaaa-aaaa-aaaaa-a111aa111', 123), { host: 'codespaces+aaaaa-aaaaa-aaaa-aaaaa-a111aa111', port: 123 });
+	});
+
 });