Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5: ModuleCompileOptions doesn't actually have the warningFilter field #14012

Closed
hyrious opened this issue Oct 29, 2024 · 0 comments · Fixed by #14066
Closed

Svelte 5: ModuleCompileOptions doesn't actually have the warningFilter field #14012

hyrious opened this issue Oct 29, 2024 · 0 comments · Fixed by #14066

Comments

@hyrious
Copy link

hyrious commented Oct 29, 2024

Describe the bug

The doc and type says compileModule()'s options has warningFilter, but it actually doesn't.

Reproduction

Save and run this file

import { compileModule } from 'svelte/compiler'

compileModule('let a = $state({ value: 0 })', {
  warningFilter: void 0,
})

Results in the error

InternalCompileError {
  name: 'CompileError',
  code: 'options_unrecognised',
  message: 'Unrecognised compiler option warningFilter'
}

Logs

No response

System Info

System:
    OS: macOS 15.0.1
    CPU: (8) arm64 Apple M3
    Memory: 294.86 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.9.0 - /opt/homebrew/bin/node
    npm: 10.9.0 - /opt/homebrew/bin/npm
    pnpm: 9.12.1 - /opt/homebrew/bin/pnpm
    bun: 1.1.30 - ~/.bun/bin/bun
  Browsers:
    Chrome: 130.0.6723.70
    Safari: 18.0.1
  npmPackages:
    svelte: ^5.1.3 => 5.1.3

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant