
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A TypeScript-based language where Okie! replaces true, Hey! replaces false, and Yeah? randomly evaluates to true or false
Dinoscript is a TypeScript-based language with a fun twist: Okie! replaces true, Hey! replaces false, and Yeah? randomly evaluates to either true or false at compile time.
This compiler follows the principles from "Crafting Interpreters" - Representing Code and implements a standard compiler pipeline:
Okie!, Hey!, and Yeah?Okie! → true, Hey! → false, and Yeah? → randomly chosen true or false# Global installation (CLI tool)
npm install -g dinoscript
# Or as a project dependency
npm install dinoscript
Or install via command line:
code --install-extension publisher-id.dinoscript
git clone https://github.com/yourusername/dinoscript.git
cd dinoscript
pnpm install
pnpm run build
# Transform a file (show output without writing)
pnpm dev transform examples/example.ds
# Compile a .ds file to .ts
pnpm dev compile examples/example.ds examples/example.ts
import { DinoscriptCompiler } from './src';
const compiler = new DinoscriptCompiler();
// Compile a file
const result = compiler.compile({
sourceFile: 'example.ds',
outputFile: 'example.ts',
verbose: true
});
// Transform source code in memory
const transformed = compiler.transformSource('if (Okie!) { console.log("Hello"); }');
// Result: 'if (true) { console.log("Hello"); }'
For direct tsc integration, you can use the custom file system host:
import * as ts from 'typescript';
import { createDinoscriptFileSystemHost } from './src';
const options: ts.CompilerOptions = {
target: ts.ScriptTarget.ES2017,
module: ts.ModuleKind.ESNext,
};
const host = createDinoscriptFileSystemHost();
const program = ts.createProgram(['example.ds'], options, host);
const emitResult = program.emit();
Dinoscript (example.ds):
function isAwesome(): boolean {
return Okie!;
}
if (Okie!) {
console.log("Dinosaurs are awesome!");
}
const flag: boolean = Hey!;
Transformed TypeScript:
function isAwesome(): boolean {
return true;
}
if (true) {
console.log("Dinosaurs are awesome!");
}
const flag: boolean = false;
Source-level transformation: We transform the source code before TypeScript's parser sees it. This is simpler than extending TypeScript's scanner/parser.
Word boundary detection: The scanner ensures Okie!, Hey!, and Yeah? are only matched when they're standalone tokens, not part of larger identifiers.
Case-insensitive matching: Both Okie!/okie!, Hey!/hey!, and Yeah?/yeah? are recognized.
Random evaluation: Yeah? randomly evaluates to either true or false at compile time. Each occurrence is independently randomized.
Type preservation: The transformed code maintains TypeScript's type system - Okie!, Hey!, and Yeah? become true or false which are typed as boolean.
Run the test suite:
pnpm test
dinoscript/
├── src/ # Source code
│ ├── types.ts # Type definitions
│ ├── scanner.ts # Lexical analysis
│ ├── transformer.ts # Source transformation
│ ├── compiler.ts # Main compiler
│ ├── ts-transformer.ts # TypeScript integration
│ ├── tsc-integration.ts # tsc integration
│ └── index.ts # Public API
├── bin/ # CLI scripts
│ └── dinoscript.ts
├── examples/ # Example files
│ ├── example.ds
│ └── test-compilation.ts
├── package.json
├── tsconfig.json
└── README.md
See src/ARCHITECTURE.md for detailed architecture documentation.
FAQs
A TypeScript-based language where Okie! replaces true, Hey! replaces false, and Yeah? randomly evaluates to true or false
The npm package dinoscript receives a total of 1 weekly downloads. As such, dinoscript popularity was classified as not popular.
We found that dinoscript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.