sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: Output migration transforms eventEmitter.emit() into invalid output.emit()
Labels: area: migrations,bug

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

Yes

### Description

The output migration transforms:

```ts
@Output() eventEmitter = new EventEmitter<string>();

// later
eventEmitter.emit();
```

into
```ts
eventEmitter = output<string>();

// later
eventEmitter.emit();
```

But the value is mandatory in the `output.emit` signature, so the application breaks.
The migration could generate `emit(undefined)` in that case, or add a `TODO` or only treat this in with the `--best-effort-mode` option.

To repro, in the following Stackblitz, run:

```
ng g @angular/core:signals --migrations=outputs --path=./ --no-best-effort-mode
```

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-h5tea2?file=src%2Fmain.ts

### Please provide the exception or error you saw

```true
✘ [ERROR] TS2554: Expected 1 arguments, but got 0. [plugin angular-compiler]

    src/main.ts:18:22:
      18 │     this.eventEmitter.emit();
         ╵                       ~~~~

  An argument for 'value' was not provided.

    node_modules/@angular/core/index.d.ts:8288:9:
      8288 │     emit(value: T): void;
```

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 19.0.0-rc.1
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64

Angular: 19.0.0-rc.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.0-rc.1
@angular-devkit/build-angular   19.0.0-rc.1
@angular-devkit/core            19.0.0-rc.1
@angular-devkit/schematics      19.0.0-rc.1
@schematics/angular             19.0.0-rc.1
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10
```

### Anything else?

_No response_
Repository: next.js
Issue: Middleware does not add nonce when deployed to AWS amplify, but works well on local development
Labels: bug,Middleware

### Link to the code that reproduces this issue

https://github.com/peterochieng/csp-test

### To Reproduce

1. Add middleware for Adding CSP directives. 
`import { NextRequest, NextResponse } from 'next/server'

export const nonce = Buffer.from(crypto.randomUUID()).toString('base64')
 
export function middleware(request: NextRequest) {
  
  const cspHeader = `
    default-src 'self';
    script-src 'self' 'nonce-${nonce}' 'unsafe-eval';
    style-src 'self' 'unsafe-inline';
    img-src 'self' blob: data:;
    font-src 'self';
    object-src 'none';
    base-uri 'self';
    form-action 'self';
    frame-ancestors 'none';
    upgrade-insecure-requests;
    connect-src 'self' https://example.com https://ipapi.co/json/;
`
  // Replace newline characters and spaces
  const contentSecurityPolicyHeaderValue = cspHeader
    .replace(/\s{2,}/g, ' ')
    .trim()
 
  const requestHeaders = new Headers(request.headers)
  requestHeaders.set('x-nonce', nonce)
 
  requestHeaders.set(
    'Content-Security-Policy',
    contentSecurityPolicyHeaderValue
  )
 
  const response = NextResponse.next({
    request: {
      headers: requestHeaders,
    },
  })
  response.headers.set(
    'Content-Security-Policy',
    contentSecurityPolicyHeaderValue
  )
 
  return response
}

export const config = {
  matcher: [
    '/(.*)',
    '/', // explicit matcher for root route
  ],
}
`
2. Run the application on local dev using npm run dev. Test and you'll see it works fine. Open network tab in dev tools and check the response. All scripts, have the nonce added on local dev. 

3. Deploy your sample application to AWS amplify. You will get a white screen or screen with no content with errors in console in devTools.  I have attached screenshot of error.
![aws amplify middlewawre error](https://github.com/user-attachments/assets/b8c11c4a-06f3-4a3d-a077-60ecea2507ba)


### Current vs. Expected behavior

I expect the web app to load well without issues since CSP addition is done by middleware. But, what I get is a blank screen with an error. This error.
![aws amplify middlewawre error](https://github.com/user-attachments/assets/526b9a5c-fe4a-4c35-a3a6-b1946077dead)


### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro N
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.0.4
  eslint-config-next: 14.0.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Middleware

### Which stage(s) are affected? (Select all that apply)

Other (Deployed)

### Additional context

_No response_
Repository: vscode
Issue: Hover gray +/- should not be focusable? Also, hover should say what grayed out buttons mean, eg "maximum verbosity achieved"
Labels: polish,editor-hover

Repro: 

1. open expandable hover
2. increase verbosity until max 
3. click on the grayed out `+` button

![Image](https://github.com/user-attachments/assets/03a166e9-0b8b-40a3-865a-60147edefe81)

Version: 1.96.0-insider
Commit: 399779942db4d7ab1bd6f6ae976482d0020f10ca
Date: 2024-11-13T05:04:32.098Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0
Repository: neovim
Issue: Add continuations to `vim.lsp.buf.*` functions
Labels: enhancement,lsp,async

## Problem

All `vim.lsp.buf.*` functions run asynchronously, however they do not provide callbacks when they finish.

This is needed so users can invoke other behaviours after calling these functions. And in general, asynchronous functions should always provide continuations of some form.


## Proposal

- Add a `callback` argument after every `opts` field in `vim.lsp.buf*`.
  - `vim.lsp.buf.hover(config)` -> `vim.lsp.buf.hover(opts, callback)`
  - `vim.lsp.buf.declaration(opts)` -> `vim.lsp.buf.declaration(opts, callback)`
  - `vim.lsp.buf.definition(opts)` -> `vim.lsp.buf.definition(opts, callback)`
  - `vim.lsp.buf.type_definition(opts)` -> `vim.lsp.buf.type_definition(opts, callback)`
  - `vim.lsp.buf.implementation(opts)` -> `vim.lsp.buf.implementation(opts, callback)`
  - `vim.lsp.buf.signature_help(config)` -> `vim.lsp.buf.signature_help(opts, callback)`
  - `vim.lsp.buf.format(opts)` -> `vim.lsp.buf.format(opts, callback)`
  - `vim.lsp.buf.rename(new_name, opts)` -> `vim.lsp.buf.rename(new_name, opts, callback)`
  - `vim.lsp.buf.references(context, opts)` -> `vim.lsp.buf.references(context, opts, callback)`
  - `vim.lsp.buf.document_symbol(opts)` -> `vim.lsp.buf.document_symbol(opts, callback)`
  - `vim.lsp.buf.incoming_calls()` -> `vim.lsp.buf.incoming_calls(callback)`
  - `vim.lsp.buf.outgoing_calls()` -> `vim.lsp.buf.outgoing_calls(callback)`
  - `vim.lsp.buf.typehierarchy(kind)` -> `vim.lsp.buf.typehierarchy(kind, callback)`
  - `vim.lsp.buf.workspace_symbol(query, opts)` -> `vim.lsp.buf.workspace_symbol(query, opts, callback)`
  - `vim.lsp.buf.document_highlight()` -> `vim.lsp.buf.document_highlight(callback)`
  - `vim.lsp.buf.code_action(opts)` -> `vim.lsp.buf.code_action(opts, callback)`
- Deprecate the `async` and `sync` options from `vim.lsp.buf.format()`
- Deprecate `vim.lsp.buf_request_sync()`
- ~(optional) If `callback` is not provided, then functions are run synchronously (like `vim.uv.*`).~
  - ~How would this impact mappings?~
- Each function should return a object with the methods `cancel()` and `wait()`, similar to `vim.system()`'s `vim.SystemObj`.

### Notes:
- For functions that don't have an `opts`, `callback` will be the only option. If `opts` is required in the future then it can be added with overloads.
- `callback` could alternatively be made an option in `opts`, however this is likely to make it more awkward to use with what gets implemented in #19624, which will include `async.wrap(fun, cb_pos)` function.
Repository: deno
Issue: [WebSocketStream] Websocket handshake User-Agent header duplicated
Labels: ext/websocket

Version: Deno/2.0.6

**Step 1**
Websocket Stream client (`ws.ts`):
```
const wss = new WebSocketStream('ws://1.1.1.1/' /* over http to see handshake request */, {
    headers: {
      'User-Agent': 'My-UA'
    }
})

const { readable, writable } = await wss.opened
console.log('Connected')
```

**Step 2**
Open Wireshark to capture websocket's http handshake request

**Step 3**
Run client:
```
deno --allow-net --unstable-net ws.ts
```

**Result**
http handshake request
```
GET / HTTP/1.1
host: 1.1.1.1
upgrade: websocket
connection: Upgrade
sec-websocket-key: ZZPd2TFAskpUnsM+/1fgDQ==
user-agent: Deno/2.0.6
user-agent: My-UA
sec-websocket-version: 13

```
![image](https://github.com/user-attachments/assets/00ea0582-849f-4700-81a5-f84bb44630c3)

=> Some web servers will concat duplicate header to one or array that leads to the wrong user-agent header

**Reason**
Deno set default User-Agent header value (array) into a fetch request
Deno append new headers of WebSocketStream into existing fetch's headers array
Repository: svelte
Issue: effects.js causes Fatal Error
Labels: awaiting submitter

### Describe the bug

Push to 'null' causes **total crash of project**.

The error causing line is at src/internal/client/reactivity/effect.js:270
`context.l.r1.push(token);`

Error message:

```shell
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'r1')
``` 

### Reproduction

In a seperate project, which I created by the template doesn't show that effect.
Sorry, I'm not so deep into svelte-internals to know how this bug can be reproduced

External libs that caused this error:
"svelte-fa"
"svelte-file-dropzone"

I tried to add some icons with Fa in the basic example but it doesn't show the effect I face in production.

### Logs

```shell
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'r1')
```


### System Info

```shell
System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900HK
    Memory: 6.86 GB / 31.68 GB
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.6.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.7.0 - ~\scoop\shims\pnpm.EXE
  Browsers:
    Edge: Chromium (130.0.2849.46)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    svelte: ^5.1.9 => 5.1.16
    webpack: ^5.96.1 => 5.96.1
```


### Severity

blocking all usage of svelte
Repository: TypeScript
Issue: `Intl.Locale.prototype.getTimeZones()` is missing from Intl library definitions
Labels: Bug,Help Wanted,Domain: lib.d.ts

### ⚙ Compilation target

ESNext

### ⚙ Library

ESNext

### Missing / Incorrect Definition

`Intl.Locale.prototype.getTimeZones()` doesn't exist in the `Intl` library definitions. It is supported in all browsers except Firefox.


### Sample Code

```TypeScript
const loc = new Intl.Locale("en-US");
const localeTimeZones = loc.getTimeZones();
```

### Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTimeZones

https://tc39.es/proposal-intl-locale-info/#sec-Intl.Locale.prototype.getTimeZones
Repository: pytorch
Issue: `Tensor.prod` gives a jit warning
Labels: oncall: jit

### 🐛 Describe the bug

On a machine with cuda, run
```bash
python -c """import torch;torch.randn(10, device='cuda').prod()"""
```
wich raises
```
<string>:1: UserWarning: No PYTORCH_KERNEL_CACHE_PATH or HOME environment variable set! This disables kernel caching. (Triggered internally at /pytorch/aten/src/ATen/native/cuda/jit_utils.cpp:1426.)
```


### Versions

2.6.0.dev20241113+cu124

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: electron
Issue: You cannot use fetch(file://xxxx) files in web workers
Labels: platform/windows,bug :beetle:,has-repro-gist,32-x-y

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

32.1.2

### What operating system(s) are you using?

Windows

### Operating System Version

Windows 10 22H2

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

You can use fetch file on web worker


### Actual Behavior

![Image](https://github.com/user-attachments/assets/5f33b63f-5fd8-452f-9f84-89e71e7f0489)

worker code
`
;(async () => {
  await fetch('c:/Users/a/Desktop/TEST/t1/d3cdc838a18f53ad0e15e3795fbb51d9 (1).mp4').body
})()
`
failed net:ERROR_UNKNOWN_URL_SCHEME 

But it's normal if I'm not using it in worker. I confirm that I have enabled webSecurity.


### Testcase Gist URL

https://gist.github.com/tetap/ccf2a1ca8c30d77958c829a1aa2f1209

### Additional Information

_No response_
Repository: pytorch
Issue: [Feature Request] The `.forward()`/etc. shape API
Labels: module: nn,triaged

[There is](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.forward) the `nn.Module.forward(...)` method. So, it’s “standardized”.

Each concrete `.forward(...)`'s documentation has its return shape (formula).

Is there an API/a project of API of the `.get_forward_shape(...)` method to get it programatically?

_Originally posted at [the forum](https://discuss.pytorch.org/t/the-forward-etc-shape-api/212509)._

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: ui
Issue: [bug]: Typescript error in form component
Labels: bug

### Describe the bug

There is typescript errors within form component.

Property formState does not exist in useFormContext.

Than for part

`const fieldState = getFieldState(fieldContext.name, formState)`

getFieldState expect no arguments.

Than later we have error with usage of: ` const { error, formItemId } = useFormField()`.

TS2339: Property error does not exist on type
{   id: string;   name: string;   formItemId: string;   formDescriptionId: string;   formMessageId: string; }

Error in typescript brake process build for Nextjs.


### Affected component/components

Form

### How to reproduce

Test form component within nextjs application.

### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
next build

  ▲ Next.js 14.2.4
  - Environments: .env.local

   Creating an optimized production build ...
 ⚠ For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
 ⚠ For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
 ✓ Compiled successfully
   Linting and checking validity of types  .Failed to compile.

./src/components/ui/form.tsx:45:26
Type error: Property 'formState' does not exist on type '{ getFieldState: () => {}; getValues: () => {}; watch: () => {}; setValue: () => {}; register: () => {}; }'.

  43 |   const fieldContext = React.useContext(FormFieldContext)
  44 |   const itemContext = React.useContext(FormItemContext)
> 45 |   const { getFieldState, formState } = useFormContext()
     |                          ^
  46 |
  47 |   const fieldState = getFieldState(fieldContext.name, formState)
  48 |
 ELIFECYCLE  Command failed with exit code 1.
```


### System Info

```bash
Linux Mint, nodejs v22.11.0, nextjs 14.2.4
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: material-ui
Issue: Issue with Icons after selecting 
Labels: bug 🐛,docs,package: icons,support: docs-feedback

### Related page

https://mui.com/material-ui/material-icons

### Kind of issue

Unclear explanations

### Issue description

After copying any of the Icons if we come back whole display gets stuck fix it 

### Context

After copying the icons close the Dailog box and reset the state so that user can select other icons 

**Search keywords**: Icons
Repository: PowerToys
Issue: Advanced Paste - Type out the Clipboard Content
Labels: Needs-Triage

### Description of the new feature / enhancement

New Option in the "Advanced paste" menu to type out clipboard content.

### Scenario when this would be used?

Environments/Remote Connections that don't allow pasting from local machine.

### Supporting information

_No response_
Repository: pytorch
Issue: vmap with mps tensor fails to recognized batched shape
Labels: triaged,module: vmap,module: mps,module: functorch

### 🐛 Describe the bug

The following code where mps tensors are used in vmap raises an exception:

```python
import torch

device = "mps"
x = torch.randn(2, 150, device=device, requires_grad=True)
y = torch.randn(150, device=device, requires_grad=True)

torch.vmap(lambda x, y: torch.nn.functional.mse_loss(x, y), (0, None))(x, y)
```
Exception:
```
  File "python3.10/site-packages/torch/nn/functional.py", line 3902, in mse_loss
    return torch._C._nn.mse_loss(
RuntimeError: mse_loss_out_mps: target and input tensors must have identical shapes
```

### Versions

latest nightly

cc @zou3519 @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen @Chillee @samdow @kshitij12345
Repository: godot
Issue: Misleading error on missing export template file
Labels: bug,topic:editor,topic:export

### Tested versions

- 4.4.dev.custom_build [76fa7b291]
- 4.3-stable
- Shall be reproducible in any 4.x version

### System information

Godot v4.4.dev (76fa7b291) - Windows 10.0.22631 - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 32.0.15.6603) - AMD Ryzen 9 3900X 12-Core Processor (24 threads)

### Issue description

When exporting a runnable project, if the template for the exported configuration is missing, but others are available, Godot fails with a generic _"Failed to copy export template"_ error message.

The following errors appear in console:
```
Failed to open 
editor/export/editor_export_platform.h:182 - Prepare Template: Failed to copy export template.
```

This is somewhat confusing, as the user can't figure straight away what's wrong, since _other_ templates are available and the button "Export Project..." is also clickable.

The editor then shows the error message:
![Screenshot 2024-11-14 140453](https://github.com/user-attachments/assets/928d9ee1-502b-4587-824c-d2ea604ccfbf)

### Steps to reproduce

1. Open the _Project->Export_ dialog and tick the _Runnable_ option
2. Specify a custom export template, for example, the _Release_ one
3. Press the _Export Project..._ button
4. Attempt to export with the _other_ configuration, in this example, _Debug_, by checking the related option in the export dialog

Providing a Debug template and exporting a Release configuration triggers the same error.

![Screenshot 2024-11-14 142845](https://github.com/user-attachments/assets/1fe9fce1-da39-44fd-a33e-fb35736f6d9c)


### Minimal reproduction project (MRP)

[missing_export_template_bug.zip](https://github.com/user-attachments/files/17748598/missing_export_template_bug.zip)
Repository: deno
Issue: deno.lock impacts which version is used, despite explicit version import
Labels: needs investigation

We noticed (in this issue: https://github.com/honojs/middleware/issues/803) that when a dependency is listed several times with different versions in the `deno.lock` file, different versions are somehow used in different part of the code (see the error message of this comment: https://github.com/honojs/middleware/issues/803#issuecomment-2475694935). Even if an only explicit version is used in the code.

Reproduction example:
```ts
import { z } from 'npm:zod@3.23.8'

import { zValidator } from 'npm:@hono/zod-validator@0.4.1'
import { Hono } from 'npm:hono@4.6.10'

const app = new Hono().put(
  '/posts',
  zValidator('json', z.object({ id: z.number() })),
  (c) => {
    const json = c.req.valid('json')
    return c.json({ status: 'ok' })
  },
)
```

If we remove the `deno.lock` file, the type of the `json` variable is well inferred. If we have a `deno.lock` file with different versions, the type will be wrongly inferred to `never` because different versions will be used (see in this comment hono is used in both versions `4.6.8` and `4.6.10`).

I have noticed that if we only have one dependency in the `deno.lock` file, it works well:
```json
  "specifiers": {
    "npm:@hono/zod-validator@0.4.1": "0.4.1_hono@4.6.10_zod@3.23.8",
    "npm:zod@3.23.8": "3.23.8",
    "npm:hono@4.6.10": "4.6.10"
  },
```
but if we have several times the dependency, it does not work:
```json
  "specifiers": {
    "npm:@hono/zod-validator@0.4.1": "0.4.1_hono@4.6.10_zod@3.23.8",
    "npm:zod@3.23.8": "3.23.8",
    "npm:hono@4.6.8": "4.6.8",
    "npm:hono@4.6.10": "4.6.10"
  },
```

```bash
$ deno --version
deno 2.0.6 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.13-rusty
typescript 5.6.2
```
Repository: next.js
Issue: Pages router with middleware (on vercel) - 404 results returning 200 when prefetched 
Labels: create-next-app,bug,Middleware,Pages Router

### Link to the code that reproduces this issue

https://github.com/magicspon/next-link-test

### To Reproduce

Build and deploy the app to vercel.
Go to the URL
Click on the "Broken link" button.
Observe, the 404 page is not shown.

This only happens when running on vercel, it's fine on localhost.

It also only happens when there is middleware on the site, even though these urls aren't matched by the middleware

### Current vs. Expected behavior

When clicking on a link that 404's, I would expect to see the 404 page.



### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020
  Available memory (MB): 16384
  Available CPU cores: 12
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: 8.14.0
Relevant Packages:
  next: 15.0.4-canary.11 // Latest available version is detected (15.0.4-canary.11).
  eslint-config-next: 15.0.3
  react: 19.0.0-rc-7ac8e612-20241113
  react-dom: 19.0.0-rc-7ac8e612-20241113
  typescript: 5.6.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

create-next-app, Middleware, Pages Router

### Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

### Additional context

I've tested against the latest v14 release, the latest 15 release and the latest 15 canary release.

https://github.com/vercel/next.js/issues/57207
https://github.com/vercel/next.js/issues/56222