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

java-slang

v1.0.14

Published

Open-source Implementation of the Java language in TypeScript. (<https://docs.oracle.com/javase/specs/>).

Readme

java-slang

Open-source Implementation of the Java language in TypeScript. (https://docs.oracle.com/javase/specs/).

Table of Contents

Prerequisites

Usage

To build,

$ git clone --recurse-submodules https://github.com/source-academy/java-slang.git
$ cd java-slang
$ yarn
$ yarn build

This repository uses git submodules. To update existing repositories with a submodule,

# Init is only required on the very first time.
$ git submodule update --init --recursive
# Required subsequently every time you want to update the submodules.
$ git submodule update --recursive --remote

Current Features

The Java language in Source Academy currently supports a host of available features, including:

  • Primitive classes: boolean, byte, short, int, long, char, float and double.
  • Custom (non-primitive) classes
  • Method overloading
  • Implicit type widening for both primitive and non-primitive types (e.g. int to long)
  • Basic exception/error messages
  • Basic system calls e.g. System.out.println
  • Explicit type conversion (type narrowing)
  • Implicit type conversion for system calls (e.g. int input to System.out.println)
  • Single nested class

Future Features

  • Multiple class declarations in the same file
  • Inheritance (basis for implementation exists but requires multiclass declaration to function)
  • Generics
  • Multi-file programs

Testing

java-slang comes with an extensive test suite. To run the tests after you made your modifications, run yarn test. Regression tests are run automatically when you want to push changes to this repository. The regression tests are generated using jest and stored as snapshots in src/\_\_tests\_\_. After modifying java-slang, carefully inspect any failing regression tests reported in red in the command line. If you are convinced that the regression tests and not your changes are at fault, you can update the regression tests as follows:

$ yarn global add jest
$ yarn test --updateSnapshot

Using your java-slang in Source Academy

java-slang is used by the Source Academy, the immersive online experiential environment for learning programming. For this, java-slang is deployed as an NPM package. The frontend of the Source Academy then includes the java-slang package in its deployment bundle.

Using your java-slang in your local Source Academy

A common issue when developing modifications to java-slang is how to test it using your own local frontend. Assume that you have built your own frontend locally, here is how you can make it use your own java-slang, instead of the one that the Source Academy team has deployed to npm.

First, build and link your local java-slang:

$ cd java-slang
$ yarn build
$ yarn link

Then, from your local copy of frontend:

$ cd frontend
$ yarn link path/to/java-slang

Replace "path/to/java-slang" with the path to the java-slang repository. After running the command, start the frontend and the new java-slang will be used.

License

License

All sources in this repository are licensed under the Apache License Version 2.