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

@pb-shrugged/tree-sitter-powerbuilder

v2.0.6

Published

Powerbuilder grammar for tree-sitter

Downloads

12

Readme

tree-sitter-powerbuilder

A Tree-sitter grammar for PowerBuilder, providing syntax highlighting, code navigation, and parsing capabilities for PowerBuilder source files.

Features

  • 🎯 Complete PowerBuilder Grammar: Supports PowerBuilder syntax including objects, functions, events, and data types
  • 🌐 Multi-Platform: Works on Linux, Windows, and macOS
  • 📦 Multiple Bindings: Available for Node.js, Python, Rust, Go, Swift, and C
  • 🚀 WebAssembly Support: Can be used in web browsers
  • 🔧 IDE Integration: Compatible with editors that support Tree-sitter
  • Fast Parsing: Incremental parsing for efficient code analysis

Supported File Types

  • .srs - Structure
  • .srf - Function
  • .srw - Window
  • .sru - User Object
  • .sra - Application
  • .srm - Menu
  • .srd - DataWindow Syntax

Installation

NPM (Node.js)

npm install tree-sitter-powerbuilder

Usage with Tree-sitter CLI

# Install tree-sitter CLI
npm install -g tree-sitter-cli

# Clone this repository
git clone https://github.com/pb-shrugged/tree-sitter-powerbuilder.git
cd tree-sitter-powerbuilder

# Generate the parser
tree-sitter generate

# Test the parser
tree-sitter test

# Parse a PowerBuilder file
tree-sitter parse path/to/your/file.sru

Usage

Node.js

const Parser = require('tree-sitter');
const PowerBuilder = require('tree-sitter-powerbuilder');

const parser = new Parser();
parser.setLanguage(PowerBuilder);

const sourceCode = `
global type w_main from window
end type

on w_main.create
// Window creation code
end on
`;

const tree = parser.parse(sourceCode);
console.log(tree.rootNode.toString());

Development

Prerequisites

  • Node.js 18+
  • tree-sitter CLI: npm install -g tree-sitter-cli

Setup

git clone https://github.com/pb-shrugged/tree-sitter-powerbuilder.git
cd tree-sitter-powerbuilder
npm install

Development Commands

# Generate the grammar
npm run ts:generate

# Run tests
npm run ts:test

# Build WebAssembly
npm run ts:run

# Lint code
npm run lint

# Run all tests
npm test

CI/CD Pipeline

This project uses GitHub Actions for continuous integration and deployment:

  • CI Workflow: Runs tests on every push and pull request across multiple platforms
  • Release Workflow: Automatically creates GitHub releases when tags are pushed
  • Publish Workflow: Automatically publishes to NPM when releases are created
  • Security Workflow: Regular security audits and dependency reviews

Automated Releases

To create a new release:

  1. Use the "Update Version" workflow in GitHub Actions, or
  2. Manually create a tag: git tag v1.0.0 && git push origin v1.0.0

The release process will automatically:

  • Create a GitHub release with assets
  • Publish the package to NPM
  • Generate cross-platform binaries

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Start for Contributors

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run tests: npm run ts:test
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Tree-sitter for the parsing framework
  • PowerBuilder community for language insights and feedback

Links