npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pinescript-v6-validator

v0.3.0

Published

TradingView Pine Script v6 validator and reference dataset — 457 function signatures with explicit overload modelling. The engine behind the Pine Script v6 IDE Tools VS Code extension.

Readme

pinescript-v6-validator

TradingView Pine Script v6 validator and reference dataset — the engine behind the Pine Script v6 IDE Tools VS Code extension (1,400+ installs).

No vscode dependency, so the same engine runs in an editor, in CI, in a headless CLI, and inside an MCP server. One engine means an agent and your editor cannot disagree about a file.

Install

npm install pinescript-v6-validator

Use

const { validatePineScript } = require('pinescript-v6-validator');

const errors = validatePineScript(source);
// [{ line, column, length, message, severity }]  severity: 0=error 1=warning

Run all diagnostic sources via validatePineScript. Calling AccurateValidator alone misses the whole-document checks, which is how a "clean" verdict once appeared on files the editor was marking with errors.

const { PINE_FUNCTIONS_MERGED } = require('pinescript-v6-validator');

PINE_FUNCTIONS_MERGED['line.new'].overloads;
// Both official call forms: (first_point, second_point, …) and (x1, y1, x2, y2, …)

Semantic checks — defects that compile

Most Pine tooling catches code TradingView will reject. These catch code it accepts and then behaves unexpectedly:

| ID | Detects | |---|---| | S1 | request.security() reading the current, still-forming bar — repainting | | S2 | ta.* called inside a conditional — its history develops gaps | | S5 / S6 | More than 64 plots or 40 request.*() calls — TradingView rejects the script | | S7 | plot / bgcolor / fill outside global scope — a v6 scope error | | S8 | A function defined inside a block — Pine has no nested functions | | S9 | strategy.entry with no exit anywhere — unbounded risk |

Suppress a specific finding when you have considered it:

d = request.security(t, "D", close)   // pine-ignore: S1

Syntactic diagnostics are never suppressible — a compile error is a fact, not a judgement.

What it catches

  • Overloaded constructors. line.new, label.new and box.new each accept a chart.point or independent coordinates. A call is valid if it satisfies any overload — flattening them is what made correct code look broken.
  • Wrong parameter names — colour for color, shape= for style=, textalign where text_halign belongs
  • Arity errors, with balanced-paren argument counting
  • Undefined namespaces, variables and functions; user-defined type/enum
  • Multiline strings ("""…"""), for…in iterators, wrapped calls containing comments or blank lines

What it does not do

No AST, so no type inference. It is a fast line-based checker, not a compiler — roughly 12ms for a 1,300-line script.

Currency

The dataset is a point-in-time scrape of the official v6 reference (2025-10-03) plus a hand-maintained layer covering everything TradingView shipped since, through July 2026: request.footprint(), multiline strings, sort_field, active on inputs, timeframe_bars_back, calc_on_every_history_tick, syminfo.isin, box.set_xloc().

Rules get removed too — the December 2025 release dropped wrapped-line indentation restrictions, and this reflects that.

Related

License

MIT © Jaroslav Pantsjoha