Registry / testing / liquidsoap-prettier

liquidsoap-prettier

JSON →
library1.8.3jsnpmunverified

A Prettier plugin and CLI tool for formatting Liquidsoap scripts (`.liq` files). Current stable version is 1.8.3. The package provides both a command-line utility for direct formatting and a Prettier plugin that integrates into existing workflows. It uses a JSON parser exported via js_of_ocaml from the Liquidsoap codebase. Regularly updated to match Liquidsoap language changes.

npm install liquidsoap-prettier
INSTALL
IMPORT
SIG · LIQUIDSOAP-PRETTIE
L
liquidsoap-prettier
testingjavascriptv1.8.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import liquidsoap-prettier from 'liquidsoap-prettier'
require('liquidsoap-prettier')
ESM-only package; CommonJS require is not supported.
liquidsoap-prettier
import { liquidsoap-prettier } from 'liquidsoap-prettier'
Named export for the plugin object.
Plugin
import { Plugin } from 'liquidsoap-prettier'
import Plugin from 'liquidsoap-prettier'
Plugin is a named export, not default.

Installation and basic usage of liquidsoap-prettier as both a Prettier plugin and standalone CLI.

// Install dependencies npm install -D prettier liquidsoap-prettier // Create a .prettierrc file with: { "plugins": ["liquidsoap-prettier"] } // Run Prettier on a Liquidsoap file npx prettier --write path/to/file.liq // Alternatively, use the CLI directly npx liquidsoap-prettier -w path/to/file.liq // Check formatting (CI) npx liquidsoap-prettier -c path/to/file.liq
liquidsoap-prettier --version
Debug
Known issues
gotchaThe package does not bundle the Liquidsoap parser; must run `npm run dev:prepare` or have opam installed for parser updates.
fix
Run `npm run dev:prepare` or install Liquidsoap via opam.
affects: >=1.0
deprecatedUsing require() to import the plugin is deprecated in favor of ESM imports.
fix
Use ESM import syntax or configure Prettier to handle ESM.
affects: >=1.5
breakingPlugin API changed; old import paths no longer work.
fix
Update to v1.0+ and use proper plugin registration in .prettierrc.
affects: <1.0
Errors
Common errors & fixes
Error: Cannot find module 'liquidsoap-prettier'
Package not installed or not in node_modules.
fix
Run `npm install -D liquidsoap-prettier` in your project.
SyntaxError: Unexpected token '#'
Liquidsoap parser cannot parse file with unsupported syntax.
fix
Ensure the Liquidsoap version matches the parser version; update parser via `npm run dev:prepare`.
Error: Package subpath './package.json' is not defined by "exports"
Using an outdated Node version or incorrect import path.
fix
Use Node >=14 and import from 'liquidsoap-prettier' only.
Upgrade
Version history
1.8.3latest on npm
Audit
Dependencies
prettieroptionalRequired for plugin functionality
Agent activity
6 hits · last 30 days
node
4
Resources
liquidsoap-prettier — npm install liquidsoap-prettier · libregistry