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

@scratch-code/turbowarp-blocks

v0.1.0

Published

TurboWarp-compatible Scratch block specifications

Readme

@scratch-code/turbowarp-blocks

TurboWarp-compatible block specifications for @scratch-code/block-spec. The package contains 294 serializable definitions: 169 extracted from the TurboWarp scratch-blocks fork at revision 7c58de666658df1bb447d010132aa3914c10f41e, plus 125 block and reporter-menu definitions from the built-in extensions at scratch-vm revision 96ed93bbb5c405b7bf48f673a379f1c595672373.

Installation

npm install @scratch-code/turbowarp-blocks

This package is ESM-only, requires Node.js 22 or newer, and is licensed under GPL-3.0-only.

import { createTurboWarpBlockRegistry } from '@scratch-code/turbowarp-blocks';

const registry = createTurboWarpBlockRegistry();
registry.get('motion_movesteps');
registry.resolve('control_stop', { kind: 'control-stop', hasNext: true });

Category arrays and the aggregate turboWarpBlockSpecs are read-only catalog data. The factory creates a new registry on every call; the package does not export shared mutable registry state.

The built-in extension arrays are exported under their VM IDs: penBlockSpecs, wedo2BlockSpecs, musicBlockSpecs, microbitBlockSpecs, text2speechBlockSpecs, translateBlockSpecs, videoSensingBlockSpecs, ev3BlockSpecs, makeymakeyBlockSpecs, boostBlockSpecs, gdxforBlockSpecs, and twBlockSpecs. Reporter-accepting menus are included as their serialized ${extensionId}_menu_${menuName} shadow opcodes.

translate_getTranslate.LANGUAGE intentionally has no static default in the catalog: the VM selects that menu shadow's initial language randomly each time the extension metadata is requested.

Every definition exposes language-independent ordered arguments and separate source.scratchBlocks or source.scratchVm provenance. Core definitions use explicit scratchblocks-plus block IDs where available; built-in extensions keep an empty binding because scratchblocks-plus has no matching built-in-extension catalog. Runtime codecs do not depend on generated raw source argument data.

Dynamic definitions

control_stop, procedures_call, and procedures_prototype require a minimal TurboWarpBlockResolveContext. Static definitions can be resolved with undefined. A dynamic definition given missing or mismatched context throws InvalidTurboWarpBlockContextError rather than silently returning its base.

The base specs remain stable. Use getTurboWarpBlockResolveContext(block, hasNext) to extract this minimal context from an AST block for consumers such as @scratch-code/materialize.

Source audit

The committed manifests record the Scratch Blocks definitions and the VM extension metadata used to build the catalog. To audit them against local checkouts at the pinned revisions:

pnpm build
pnpm --filter @scratch-code/turbowarp-blocks audit:scratch-blocks -- /path/to/scratch-blocks
pnpm --filter @scratch-code/turbowarp-blocks audit:scratch-vm -- /path/to/scratch-vm

After intentionally changing the pinned VM revision, regenerate its committed catalog and manifest before auditing:

pnpm --filter @scratch-code/turbowarp-blocks generate:scratch-vm -- /path/to/scratch-vm

The catalog excludes procedures_declaration, the two argument_editor_* editor-only blocks, the Scratch Blocks demonstration extension_* definitions, and VM coreExample. It includes every entry in the VM's defaultBuiltinExtensions table except that example. speech2text is not in that table and remains outside the built-in catalog. The package does not include an SB3 adapter or external extension definitions.

License

This package is licensed under GPL-3.0-only because its catalog is derived from TurboWarp's GPL-licensed scratch-blocks source. The package does not import or bundle scratch-blocks or scratch-vm runtime code. Other packages in this monorepo keep their own licenses.